STD 66, Percent Encoding :
The percent encoding mechanism is used to represent a data octet in a component when the corresponding octet symbol is outside the permitted set or is used as a separator of the component or inside it.
Thus, percentage coding is a kind of evacuation mechanism: some characters have special meaning in URI components (β they are reserved). If you want to use such a character without its special meaning, you encode it in percent.
Unreserved characters (e.g. a , b , c , ...) can always be used directly, but it is also allowed to encode them in percent. Such URIs will be equivalent :
URIs that differ by replacing an unreserved character with its corresponding US-ASCII percent encoded octet are equivalent: they identify the same resource.
Why is it allowed to encode unreserved characters in some percentage? outdated RFC 2396 contains (bold by me):
Unreserved characters can be escaped without changing the semantics of the URI, but this should not be done if the URI is not used in a context that prevents the unescaped character from being displayed .. p>
I cannot think of an example for such a βcontext,β but this sentence suggests that there may be some.
In addition, maybe some people / implementations simply simply encode everything (except for delimiters, etc.), so they donβt need to check whether / which characters need percent encoding in the corresponding component.
unor Jan 01 '14 at 4:47
source share