Fixed URI encoding/decoding