curl / Mailing Lists / curl-library / Single Mail


Re: libidn2 support

From: Tim Rühsen <>
Date: Tue, 29 Nov 2016 22:23:32 +0100

On Mittwoch, 2. November 2016 10:04:19 CET Daniel Stenberg wrote:
> On Wed, 2 Nov 2016, Simon Josefsson wrote:
> > Switching from IDNA2003 to IDNA2008 requires thought. They are not
> > compatible, and IDNA2008 requires pre-processing (e.g., UTS #46 [1]) to
> > be usable in practice. Libidn2 does not implement any pre-processing,
> > it is a pure IDNA2008 implementation.
> >
> > [1]
> Thanks for this Simon. I wasn't aware.
> Based on this, I suppose my recommendation is that people simply switch off
> IDN support in curl builds until further notice to stay safe. The old way
> was open for trickery and the new way is incomplete.

Please review and comment
(It works for me ).

I would like to open a pull request to libidn2 soon.
That code will be useful for any DNS clients resolving IDNs.

From my mail to help-libidn mailing list:

The code introduces new flags for the lookup functions IDN2_TRANSITIONAL and
IDN2_NONTRANSITIONAL (mutual exclusive).

IDN2_TRANSITIONAL enables the TR46 transitional process.
IDN2_NONTRANSITIONAL enables the TR46 non-transitional process.

Corresponding, the 'idn2' utility now has -T/--tr46t to enable transitional
lookup and -N/--tr46nt to enable non-transitional lookup.

$ src/idn2 -T faß.de

$ src/idn2 -N faß.de

To show the TR46 mapping (upper->lowercase) in work:
$ src/idn2 Faß.de
idn2: lookup: string contains a disallowed character

$ src/idn2 -T Faß.de

$ src/idn2 -N Faß.de

Regards, Tim

List admin:

Received on 2016-11-29