[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[idn] Question about a ToUnicode step
I'm trying to understand the purpose behind some steps in
ToUnicode. From the IDNA spec:
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.
I'm curious about steps 1 & 2. I don't understand why nameprep
is being applied to ASCII domain labels. This seems to be pointless
in situations where the input string is 8-bit ASCII. Wouldn't
a simple dns character compatibility check in place of steps 1
and 2 suffice?