• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..11-May-2018-

MakefileH A D01-Feb-2017214 1510

READMEH A D01-Feb-2017655 2416

idn.cH A D01-Feb-20171.8 KiB8266

test.pyH A D01-Feb-2017242 169

README

1*** Note that as of version 2.3 Python has native IDN support, see
2*** <http://www.python.org/doc/2.3.2/lib/module-encodings.idna.html>.
3
4This is a Python interface over Simon Josefsson's libidn
5<URL:http://josefsson.org/libidn/>.
6
7To install, be sure you have libidn installed, check the Makefile, and
8type "make" and "make install".
9
10Sample use:
11
12import idn
13print idn.idn2ace("Café"); # The string must be in UTF-8
14
15With a conversion to UTF-8 first, assuming your locale is Latin-1:
16
17import idn
18name = sys.argv[1]
19ustring = unicode(name, "Latin-1")
20print idn.idn2ace(ustring.encode("UTF-8"))
21
22------------------
23Stephane Bortzmeyer <bortzmeyer@nic.fr>
24