curl-library
Re: libidn2 support
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] http://www.unicode.org/reports/tr46/
>
> 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 https://gitlab.com/rockdaboot/libidn2/tree/tr46
(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.
Example:
$ src/idn2 -T faß.de
fass.de
$ src/idn2 -N faß.de
xn--fa-hia.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
fass.de
$ src/idn2 -N Faß.de
xn--fa-hia.de
Regards, Tim
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
- application/pgp-signature attachment: This is a digitally signed message part.