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

punycode.toUnicode not working #109

Open
diegoolavarria opened this issue Apr 22, 2020 · 3 comments
Open

punycode.toUnicode not working #109

diegoolavarria opened this issue Apr 22, 2020 · 3 comments

Comments

@diegoolavarria
Copy link

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

@AlexWayfer
Copy link

AlexWayfer commented Dec 8, 2022

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

@AlexWayfer
Copy link

AlexWayfer commented Dec 9, 2022

uri-js seems working for me.

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

@AlexWayfer
Copy link

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

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

No branches or pull requests

2 participants