MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
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"))