views:

47

answers:

4

For example:

When typing παιχνιδια.com into Firefox, it is automatically converted to xn--kxadblxczv9d.com

Please suggest a tool for making such a conversion.


One of the easiest is this. Converts and checks for availability at the same time.

+1  A: 

You can use any tool that supports "Libidn". A quick search showed SimpleDNS might be of help to you.

There are heaps of converters for IDN online, if that's enough for you, you can use one of them.

halfdan
Thanks for the help man, didn't know what to search for.
Zack
A: 

Internationalized domain name (i.e. domain names with non-ASCII characters) are encoded using the Punycode system.

Joachim Sauer
A: 

You encode and decode IDNA with Python:

>>> print u'παιχνιδια'.encode('idna')
xn--mxaaitabzv9d
>>> print 'xn--mxaaitabzv9d'.decode('idna')
παιχνιδια
jleedev
+2  A: 

If you want to do it inside your browser, save the code in this answer as puny.js and the code below to puny.html, then load the file in your browser.

<html>
    <title>Punyconverter</title>
    <script type="text/javascript" src="puny.js"></script>
    <style type="text/css">
        input {width:300px;}
        label {width:100px; display:inline-block;}
    </style>
    <script type="text/javascript">
        onload = function( ) {
            var ASCII = document.getElementById("ASCII");
            var Unicode = document.getElementById("Unicode");
            var Input = document.getElementById("Input");

            Input.onkeyup=function(){
                ASCII.value = punycode.ToASCII( this.value);
                Unicode.value = punycode.ToUnicode( this.value);
            }
        };
    </script>
</html>
<body>
    <h1>Convert puny coded IDN</h1>
    <div><label for="Input">Input</label><input id="Input" type="text"></div>
    <div><label for="ASCII">ASCII</label><input id="ASCII" type="text" readonly="readonly"></div>
    <div><label for="Unicode">Unicode</label><input id="Unicode" type="text" readonly="readonly"></div>
</body>
some