Should I use accented characters in URLs?

There’s no ambiguity here: RFC3986 says no, that is, URIs cannot contain unicode characters, only ASCII.

An entirely different matter is how browsers represent encoded characters when displaying a URI, for example some browsers will display a space in a URL instead of ‘%20’. This is how IDN works too: punycoded strings are encoded and decoded by browsers on the fly, so if you visit café.com, you’re really visiting xn--caf-dma.com. What appears to be unicode chars in URLs is really only ‘visual sugar’ on the part of the browser: if you use a browser that doesn’t support IDN or unicode, the encoded version won’t work because the underlying definition of URLs simply doesn’t support it, so for it to work consistently, you need to % encode.

Leave a Comment