Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to convert a few Unicode words to an International Domain Name, (and back) but can't find a script or other resource to do it on a Windows PC.

Does anyone have such a tool?

share|improve this question

closed as off-topic by HopelessN00b Jan 30 '15 at 19:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

instead of punycode as @ignacio-vazquez-abrams said, much better using 'idna' which will give you a better translation (it includes 'xn--' code) that would be:

>>>> u'español'.encode('idna')

P.S.: wanted to comment on his response, but I couldn't :S

share|improve this answer

Python does it natively.

>>> u'あら?'.encode('punycode')
>>> print 'p8j2bk2072s'.decode('punycode')
share|improve this answer
Very cool example!! and i love python!! +1 – Arenstar Nov 13 '10 at 18:00
PS: You need to add xn- in front of what python outputs you. GNU has a Punycode library for C/C++ and C# also. – Quandary Nov 13 '10 at 18:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.