Contents
Are URLs always ASCII?
Modern clients (web browsers) are able to transform back and forth between percent encoding and Unicode, so the URL is transferred as ASCII but looks pretty for the user. Make sure you’re using a web framework/CMS that understands this encoding as well, to simplify URL input from webmasters/content editors.
Are URLs ASCII or UTF?
URLs were originally defined as ASCII only. Although it was desirable to allow non-ASCII characters in URLs, shoehorning UTF-8 into ASCII-only protocols seemed unapproachable.
Can a URL contain non-ascii characters?
URLs cannot contain spaces or non-ASCII characters. Use URL encoding to convert non-ASCII characters into a format that can be transmitted over the internet. URL encoding replaces non-ASCII characters with a percent sign (%) followed by two hexadecimal digits.
How to use non ASCII characters in an url?
In your case, maybe the filename actually contains the combining-character accent, and that’s why it worked (hard to tell). Another, older, way to handle non-ascii latin characters is to use an 8-bit latin charset representation (ISO-8859-1 or something similar, such as Windows-1252) and encode that as one byte.
How are non ASCII characters converted to UTF-8?
I believe what is becoming the standard is to convert non-ascii characters to UTF-8 byte sequences, and include those sequences as %HH hex codes in the URL. The á character is U+00E1 (Unicode), which in UTF-8 makes the two bytes 0xC3 0xA1. Hence, Clássico would become Cl%C3%A1ssico.
What to do with non ASCII Latin characters?
Another, older, way to handle non-ascii latin characters is to use an 8-bit latin charset representation (ISO-8859-1 or something similar, such as Windows-1252) and encode that as one byte. That would make Clássico into Cl%E1ssico.
Which is UTF-8 character makes 0xCC 0x81?
In UTF-8, U+0301 makes 0xCC 0x81. Which representation you should choose – unicode “á” or “a followed by combining accent” – depends on what the web server needs for matching the right thing. In your case, maybe the filename actually contains the combining-character accent, and that’s why it worked (hard to tell).