Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idnatest error if xn-- empty or all-ASCII #827

Merged
merged 1 commit into from
May 22, 2024

Conversation

markusicu
Copy link
Member

@markusicu markusicu commented May 22, 2024

[165-A48] Action Item for Markus Scherer, Editorial Committee: Update UTS#46 to validate ACE label edge cases, see L2/20-240 item F7. For Unicode 14.

Corresponds to spec change

L2/20-240 item F7

The IDNA2008 ToUnicode operation validates ACE labels ("xn--" plus Punycode)
by decoding them, then re-encoding via ToASCII, and verifying that the
round-trip output is the same as the input (case-insensitive).

The UTS#46 ToUnicode operation and its Processing step uses a cheaper
Convert/Validate step which wants to be equivalent.

However, it misses two edge cases which pass Convert/Validate step but which
IDNA2008 catches with its round-trip verification:

  1. "xn--" decodes to an empty string
  2. "xn--ASCII-" decodes to just "ASCII"

I propose that we modify
https://www.unicode.org/reports/tr46/#ProcessingStepPunycode (section 4
Processing > step 4 "Convert/Validate" > If the label starts with
“xn--”) so that it catches these cases.

...

@markusicu markusicu merged commit 614a388 into unicode-org:main May 22, 2024
19 checks passed
@markusicu markusicu deleted the idnatest-165-A48 branch May 22, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants