URL Percent Encoding and Unicode

,

This page discuss some issues about what characters should be percent encoded in URL, and how different browsers behave.

Browser Behavior

Some test on browser's behavior on URL encoding/decoding. Apparently, some browsers automatically decode parts of the percent encoding.

Copy this line:

http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(Dürer)

then go to browser, open a new tab or window, paste the line into the URL field, then Enter ↵ to load the page.

Then, select URL field and copy the URL. Then, paste in a text editor. Here are the results (on Windows browsers):

• Google Chrome
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(D%C3%BCrer)

• Safari
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(Dürer)

• Firefox
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_%28D%C3%BCrer%29

• Opera
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(Dürer)

• IE
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(Dürer)

Now, try again, starting with this line:

http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_%28D%C3%BCrer%29
• Google Chrome
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(D%C3%BCrer)

• Safari
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_%28Dürer%29

• Firefox
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_%28D%C3%BCrer%29

• Opera
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_(Dürer)

• IE
http://en.wikipedia.org/wiki/Saint_Jerome_in_His_Study_%28D%C3%BCrer%29

Another example. Start with:

http://en.wikipedia.org/wiki/Sylvester%E2%80%93Gallai_theorem
• Google Chrome
http://en.wikipedia.org/wiki/Sylvester%E2%80%93Gallai_theorem

• Safari
http://en.wikipedia.org/wiki/Sylvester–Gallai_theorem

• Firefox
http://en.wikipedia.org/wiki/Sylvester%E2%80%93Gallai_theorem

• Opera
http://en.wikipedia.org/wiki/Sylvester–Gallai_theorem

• IE
http://en.wikipedia.org/wiki/Sylvester%E2%80%93Gallai_theorem

All results are on Windows Vista, using latest public released version of the browsers as of .

Summary

Here's some summary of the behavior.

Reference

blog comments powered by Disqus