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?
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?
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')
'xn--espaol-zwa'
P.S.: wanted to comment on his response, but I couldn't :S
Python does it natively.
>>> u'あら?'.encode('punycode')
'l8jxh6512d'
>>> print 'p8j2bk2072s'.decode('punycode')
そうだ!