mathiasbynens / punycode.js

A robust Punycode converter that fully complies to RFC 3492 and RFC 5891.
https://mths.be/punycode
MIT License
1.59k stars 158 forks source link

punycode.toUnicode not working #109

Open diegoolavarria opened 4 years ago

diegoolavarria commented 4 years ago

That's it. A week ago I was able to convert emails with "xn--" to Unicode, and now it isn't.

AlexWayfer commented 1 year ago

The same I got with https://xn--d1aqf.xn--p1ai/, which should be https://дом.рф/, but this lib returns https://xn--d1aqf.эрф.

AlexWayfer commented 1 year ago

uri-js seems working for me.

URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true})
AlexWayfer commented 1 year ago

UPD: that was my bad, Punycode works only with domains (hostnames; be careful: without ports), so I've changed the code to ugly one:

https://replit.com/@AlexWayfer/punycode