Open KaiSchwarz-cnic opened 8 years ago
Punycode.js implements Punycode and nothing more. See https://github.com/mathiasbynens/todo/issues/9.
Why don’t you want to use https://github.com/jcranmer/idna-uts46?
A client-side solution and to avoid async node.js callbacks is still my target.
That's the main reason for now. We have not yet any package loader in use with which we could load idn-uts46 directly into browser (and I'm not sure if that would really work) and to keep using only one library. Just thought this is still a bug that may be of interest for you.
Got the issue#46 <-> uts46 ;-)
In the domain business, just few TLDs are based on IDN 2008 punycode conversion: .be, .ca, .de, .fr, .pm, .re, .swiss, .tf, .wf, .yt All other TLDs use the IDN 2003 standard.
Just got that information from my team mates (we work in the domain business) and they point out that the npm module "idna-uts46" handles it in the right way (but as said npm based..) and I for sure don't want to switch the library ;) A client-side solution and to avoid async node.js callbacks is still my target.
Example: fußbälle.de -> fussbälle.de (IDN 2003) fußbälle.de -> fußbälle.de (IDN 2008) <-- the correct one! fußbälle.org -> xn--fublle-cta5b.org -> fußbälle.org (which is wrong, has to be IDN 2003). correct one would be: xn--fussblle-4za.org
used methods toASCII and toUnicode.