[Bug 15489] Email addresses should be converted from Punycode to ASCII before validating them

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15489

--- Comment #1 from Mathias Bynens <mathias@qiwi.be> 2012-01-10 05:43:28 UTC ---
The spec currently says:

> A valid e-mail address is a string that matches the ABNF production
> 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined
> in RFC 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section
> 3.5. [ABNF] [RFC5322] [RFC1034]

As of revision 6884 (http://html5.org/tools/web-apps-tracker?from=6883&to=6884)
it even includes an example regular expression:

> /^[a-zA-Z0-9.!#$%&'*+-/=?\^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/

This makes IDN email addresses like `foo@mañana.com` invalid, even though its
ASCII-encoded counterpart `foo@xn--maana-pta.com` validates.

It’s probably not a good idea to force users to enter their IDN email addresses
in Punycode format. How about defining that UAs should convert any IDN email
address input to its Punycoded ASCII equivalent before validating email
addresses (by applying this regex, for example)?

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 10 January 2012 05:43:30 UTC