Muhammad Rehan Saeed
Muhammad Rehan Saeed

Reputation: 38527

Browser Support for UTF8 Encoded Characters in URL's

If I navigate to the following URL with a special UTF8 encoded character I get different results in web browsers:

http://example.com/lörickè

Where can I find a list of browsers and versions that support this feature and are there any announcements of whether the new Microsoft Edge browser supports this.

This StackOverflow post highlights the above issue for those interested.

Upvotes: 6

Views: 7910

Answers (1)

unor
unor

Reputation: 96727

What is shown in browser address bars is not necessarily what is used internally.

If you enter http://example.com/lörickè in Firefox, it gets shown like that, but it actually gets percent-encoded and becomes http://example.com/l%C3%B6rick%C3%A8. This is for usability reasons (or, if IRIs are not supported, like in HTTP/1.1, for transforming an IRI into a URI), so users don’t necessarily have to enter the correct URL (with percent-encoding), and don’t get confused by seeing these cryptic parts.

You can easily check what really gets used by copy-pasting the URL from the address bar into a text document.

So the three browsers from your example probably use the same URI (i.e., percent-encoded), but two browsers decided to display the un-encoded variant instead.

Upvotes: 15

Related Questions