GNU Internationalized Domain Name Library

Introduction

GNU Libidn is an implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group, used for internationalized domain names. The package is available under the GNU Lesser General Public License.

The library contains a generic Stringprep implementation that does Unicode 3.2 NFKC normalization, mapping and prohibitation of characters, and bidirectional character handling. Profiles for iSCSI, Kerberos 5, Nameprep, SASL and XMPP are included. Punycode and ASCII Compatible Encoding (ACE) via IDNA are supported.

The Stringprep API consists of two main functions, one for converting data from the system's native representation into UTF-8, and one function to perform the Stringprep processing. Adding a new Stringprep profile for your application within the API is straightforward. The Punycode API consists of one encoding function and one decoding function. The IDNA API consists of the ToASCII and ToUnicode functions, as well as an high-level interface for converting entire domain names to and from the ACE encoded form.

The library is used by, e.g., GNU SASL and Shishi to process user names and passwords. Libidn can be built into GNU Libc to enable a new system-wide getaddrinfo() flag for IDN processing.

Libidn is developed for the GNU/Linux system, but runs on over 20 Unix platforms (including Solaris, IRIX, AIX, and Tru64) and Windows. Libidn is written in C and (parts of) the API is accessible from C, C++, Emacs Lisp, Python and Java.

The project web page: http://www.gnu.org/software/libidn/

The software archive: ftp://alpha.gnu.org/pub/gnu/libidn/

For more information see: http://www.ietf.org/html.charters/idn-charter.html http://www.ietf.org/rfc/rfc3454.txt (stringprep specification) http://www.ietf.org/rfc/rfc3490.txt (idna specification) http://www.ietf.org/rfc/rfc3491.txt (nameprep specification) http://www.ietf.org/rfc/rfc3492.txt (punycode specification) http://www.ietf.org/internet-drafts/draft-ietf-ips-iscsi-string-prep-04.txt http://www.ietf.org/internet-drafts/draft-ietf-krb-wg-utf8-profile-01.txt http://www.ietf.org/internet-drafts/draft-ietf-sasl-anon-00.txt http://www.ietf.org/internet-drafts/draft-ietf-sasl-saslprep-00.txt http://www.ietf.org/internet-drafts/draft-ietf-xmpp-nodeprep-01.txt http://www.ietf.org/internet-drafts/draft-ietf-xmpp-resourceprep-01.txt

Further information and paid contract development: Simon Josefsson <simon@josefsson.org>

Examples