Skip to content
/ libidn2 Public

Mirror of libidn2 repository

License

GPL-3.0 and 2 other licenses found

Licenses found

GPL-3.0
COPYING
LGPL-3.0
COPYING.LESSERv3
Unknown
COPYING.unicode
Notifications You must be signed in to change notification settings

libidn/libidn2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 8, 2025
1b7ff4c · Mar 8, 2025
Jan 21, 2024
Mar 7, 2025
Feb 25, 2025
Feb 25, 2025
Jan 27, 2024
Mar 4, 2025
Feb 25, 2025
Mar 5, 2025
Mar 7, 2025
Mar 5, 2025
Jul 11, 2022
Feb 25, 2025
Mar 5, 2025
Mar 8, 2025
Mar 8, 2025
Feb 25, 2025
Jul 19, 2017
Apr 26, 2017
Apr 26, 2017
Nov 14, 2019
Mar 8, 2025
Nov 19, 2024
Feb 25, 2025
Dec 29, 2016
Feb 25, 2025
Mar 8, 2025
Mar 8, 2025
Mar 8, 2025
May 12, 2021
Mar 8, 2025
Feb 25, 2025
Mar 7, 2025
Mar 8, 2025
Mar 8, 2025
Mar 7, 2025
Jan 24, 2017

Libidn2 README -- Introduction information

Libidn2 is a free software implementation of IDNA2008, Punycode and Unicode TR46. Its purpose is to encode and decode internationalized domain names.

For technical reference, see:

The library contains functionality to convert internationalized domain names to and from ASCII Compatible Encoding (ACE).

The API consists of two main functions, idn2_to_ascii_8z for converting data from UTF-8 to ASCII Compatible Encoding (ACE), and idn2_to_unicode_8z8z to convert ACE names into UTF-8 format. There are several variations of these main functions, which accept UTF-32, or input in the local system encoding. All functions assume zero-terminated strings.

This library is backwards (API) compatible with the libidn library. Replacing the idna.h header with idn2.h into a program is sufficient to switch the application from IDNA2003 to IDNA2008 as supported by this library.

Libidn2 is believed to be a complete IDNA2008 and TR46 implementation and contains an extensive test-suite.

You can check the current test code coverage here and the current fuzzing code coverage here that is part of the continuous fuzzing project OSS-Fuzz.

License

The source code for the C library (libidn2.a or libidn.so) are dual-licensed under the terms of either the GNU General Public License version 2.0 or later - see the file COPYINGv2 - or the GNU Lesser General Public License version 3.0 or later - see the file COPYING.LESSERv3 - or both in parallel as here.

The command line tool, self tests, examples, and other auxiliary files, are licensed under the GNU General Public License version 3.0 or later - see the file COPYING.

The license of the Unicode character data files (which are parsed into static storage in the library) are documented in COPYING.unicode.

Other files are licensed as indicated in each file. There may be exceptions to these general rules, see each file for precise information.

For any copyright year range specified as YYYY-ZZZZ in this package note that the range specifies every single year in that closed interval.

Online docs

API reference

Manual

Obtaining the source

Software releases of libidn2 can be downloaded from https://ftp.gnu.org/gnu/libidn/ and ftp://ftp.gnu.org/gnu/libidn/

Development of libidn2 is organized through GitLab website, and there is an issue tracker for reporting bugs.

Building & Dependencies

Before building you should consider installing the dependencies.

When building from a release tarball archive, after unpacking you build the package like this:

./configure
make
make check

Contributing

See the contributing document.

Estimating code coverage

You need LCOV installed.

To test the code coverage of the test suite use the following:

./configure --enable-code-coverage
make && make check && make code-coverage-capture

The current coverage report can be found here.

Fuzzing

Libidn2 is being continuously fuzzed by OSS-Fuzz.

Of course you can do local fuzzing on your own, see fuzz/README.md for instructions.

The code coverage of our fuzzers can be found here.