MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //usr/share/doc/libidn-devel-0.6.5/contrib/idn-python/test.py
#!/usr/bin/python

# $Id: test.py,v 1.1 2003-02-20 23:36:41 jas Exp $

locale = "Latin-1"

import idn
import sys

if len(sys.argv) <= 1:
    print "Usage: %s name" % sys.argv[0]
    sys.exit(1)
    
name = sys.argv[1]

ustring = unicode(name, locale)
print idn.idn2ace(ustring.encode("UTF-8"))