 <p>I think that properly-encoded URIs should always pass through cleanly the second time.</p> <p>The reason being that you have to correctly parse a URI no matter what, because it's entirely legal to have characters such as <code>/ @ . : ? &amp; =</code> in a URI, provided they appear in the right places.</p> <p>So you only encode a character <strong>if it is not legal in that part of the URI</strong>. With that assertion, you then create an encoded string that IS legal at every position, so when you parse it, there is nothing left to encode.</p> <p>Bear in mind that if someone throws a URI at you to be encoded and it happens to be ambiguous (<em>ie</em> it contains special characters that alter the URI syntax), they cannot expect a correct result.</p> <p>To answer your question more directly, I would say yes: in light of all the above, you only need to have special treatment for the <code>%</code> escape sequences.</p>