IETF


Internet protocols


Distributed versus local applications


Architectural Principles of the Internet


Charset Registration Procedures


IETF terminology


Domain Name System


Internationalizing Domain Names in Applications (IDNA, RFC3490)


The full stop '.'


The hyphen


ToASCII algorithm

  1. If the sequence contains any code points outside the ASCII range (0..7F) then proceed to step 2, otherwise skip to step 3.
  2. Perform the steps specified in [NAMEPREP] and fail if there is an error. The AllowUnassigned flag is used in [NAMEPREP].
  3. If the UseSTD3ASCIIRules flag is set, then perform these checks:
    1. Verify the absence of non-LDH ASCII code points; that is, the absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F.
    2. Verify the absence of leading and trailing hyphen-minus; that is, the absence of U+002D at the beginning and end of the sequence.
  4. If the sequence contains any code points outside the ASCII range (0..7F) then proceed to step 5, otherwise skip to step 8.
  5. Verify that the sequence does NOT begin with the ACE prefix.
  6. Encode the sequence using the encoding algorithm in [PUNYCODE] and fail if there is an error.
  7. Prepend the ACE prefix.
  8. Verify that the number of code points is in the range 1 to 63 inclusive.


ToUnicode algorithm

  1. If all code points in the sequence are in the ASCII range (0..7F) then skip to step 3.
  2. Perform the steps specified in [NAMEPREP] and fail if there is an error. (If step 3 of ToASCII is also performed here, it will not affect the overall behavior of ToUnicode, but it is not necessary.) The AllowUnassigned flag is used in [NAMEPREP].
  3. Verify that the sequence begins with the ACE prefix, and save a copy of the sequence.
  4. Remove the ACE prefix.
  5. Decode the sequence using the decoding algorithm in [PUNYCODE] and fail if there is an error. Save a copy of the result of this step.
  6. Apply ToASCII.
  7. Verify that the result of step 6 matches the saved copy from step 3, using a case-insensitive ASCII comparison.
  8. Return the saved copy from step 5.


ACE prefix


Punycode (RFC 3492)


StringPrep (RFC3454)


StringPrep algorithm

  1. Map -- For each character in the input, check if it has a mapping and, if so, replace it with its mapping
  2. Normalize -- Possibly normalize the result of step 1 using Unicode normalization. This is described in section 4.
  3. Prohibit -- Check for any characters that are not allowed in the output. If any are found, return an error. This is described in section 5.
  4. Check bidi -- Possibly check for right-to-left characters, and if any are found, make sure that the whole string satisfies the requirements for bidirectional strings. If the string does not satisfy the requirements for bidirectional strings, return an error. This is described in section 6.


NamePrep (RFC3491)


So: What's wrong with IDNA?


User issues



Jan Newmarch <jan@newmarch.name>
Last modified: Mon Sep 4 11:56:26 EST 2006
Copyright © Jan Newmarch, Monash University, 2007
Creative Commons License This work is licensed under a Creative Commons License
The moral right of Jan Newmarch to be identified as the author of this page has been asserted.