Encode each part of the serialised uri.