1

How do URLs work in other countries? Let's say India or China that use non A-Z characters.

Do they use English terms in the URL? Or can they write characters in urls like:

सच्चाई.html

1 Answer 1

3

It depends on the context and characters used.

Domain names

Domain names that use non-ASCII characters are known as Internationalized Domain Names (IDNs). They are encoded using Punycode into the ASCII character set. This is to maintain compatibility with older networking software that doesn't understand Unicode.

For example, I have registered a domain name with a letter containing an 'umlaut' character. Here, übersolve.com which translates to XN--BERSOLVE-55A.COM in DNS.

Filenames / query strings

In most cases, non-ASCII characters in filenames can be represented by Unicode.

However some characters aren't allowed in URLs at all. These are percent-encoded. For example a space character ' ' would be replaced with %20.

5
  • Do you have real example of china/india/whatever use in url ?
    – dynamic
    Commented Mar 2, 2011 at 10:43
  • 1
    @yes123: i18nguy.com/markup/idna-examples.html
    – Alex Angas
    Commented Mar 2, 2011 at 11:33
  • Isn't the percent encoding just for after the domain (i.e. after the /)? Commented Mar 3, 2011 at 13:02
  • @paulmorriss: Yes - that's why I put it under the 'filenames / query strings' heading. Do you think I should make that clearer?
    – Alex Angas
    Commented Mar 3, 2011 at 21:32
  • Sorry, I didn't spot that heading. Maybe it you add "(the bit after the slash)". Commented Mar 4, 2011 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.