MOON
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
System: Linux vps.panamaemb.org.sg 3.10.0-1160.80.1.vz7.191.4 #1 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64
User: panama (500)
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"))