Encoding URIs and their components