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

Feature Request: Punycode URLs #376

Open
benaltair opened this issue Nov 15, 2023 · 3 comments
Open

Feature Request: Punycode URLs #376

benaltair opened this issue Nov 15, 2023 · 3 comments

Comments

@benaltair
Copy link

It would be helpful to have encode and decode scripts for Punycode. This refers to domain names which have international characters, such as Chinese, Arabic, or accented Latin characters. Most browsers automatically convert Punycode to the represented characters in the URL bar.

Practically this means:

xn--rhta4012bbwc.live    ===    金山银山.live
     (encoded)                    (decoded)

The scripts would allow you to decode the example on the left, and see the output on the right.

@benaltair
Copy link
Author

Something like the methods employed in this library could help speed things up perhaps:
https://github.com/mathiasbynens/punycode.js

@jk779
Copy link

jk779 commented Dec 1, 2023

I was just looking for this as well! <3

@jk779
Copy link

jk779 commented Dec 1, 2023

Oh, I've just copy and pasted the library from the link and it works, you can try it out :)

https://gist.github.com/jk779/a37ed571aca7f7adab33b73caf5a22ae

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