GNU Libidn is an implementation of the Punycode, Stringprep and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group, used for internationalized domain names. The C library 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. A native Java and C# port is also provided, licensed under the GNU Lesser General Public License.
Command-line Options:
-h, --help Print help and exit
-V, --version Print version and exit
-s, --stringprep Prepare string according to nameprep profile
-d, --punycode-decode Decode Punycode
-e, --punycode-encode Encode Punycode
-a, --idna-to-ascii Convert to ACE according to IDNA (default mode)
-u, --idna-to-unicode Convert from ACE according to IDNA
--allow-unassigned Toggle IDNA AllowUnassigned flag
--usestd3asciirules Toggle IDNA UseSTD3ASCIIRules flag
-t, --tld Check string for TLD specific rules
Only for --idna-to-ascii and --idna-to-unicode
-p, --profile=STRING Use specified stringprep profile instead
Valid stringprep profiles: `Nameprep',
`iSCSI', `Nodeprep', `Resourceprep',
`trace', `SASLprep'
--debug Print debugging information
--quiet Silent operation
Product's homepage
What's New in This Release: [ read full changelog ]
· Build issues related to _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE for MSVC have been fixed.
· Compiler warnings about ignoring return values from fgets in examples have been fixed.
· Libidn now ships with a valgrind suppressions file for the strlen issue.
· Gnulib files and translations have been updated.