MIME-Version: 1.0 In-Reply-To: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H2,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.0 X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF29 (Linux)/8.0.6_GA_5922) References: <1738085611.5809889.1401108711247.JavaMail.zimbra@redhat.com> <20140526160753.GA58166@isc.org> <2058734996.6124128.1401208390989.JavaMail.zimbra@redhat.com> Message-ID: <359623256.6442984.1401293423461.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset=utf-8 X-RT-Original-Encoding: utf-8 Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) by bugs.isc.org (Postfix) with ESMTP id D1EFE2D20571 for ; Wed, 28 May 2014 16:10:26 +0000 (UTC) Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.pao1.isc.org (Postfix) with ESMTP id 03C683493BE for ; Wed, 28 May 2014 16:10:24 +0000 (UTC) (envelope-from thozza@redhat.com) Received: from zmail19.collab.prod.int.phx2.redhat.com (zmail19.collab.prod.int.phx2.redhat.com [10.5.83.22]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4SGANuo011018 for ; Wed, 28 May 2014 12:10:23 -0400 Delivered-To: bind-suggest@bugs.isc.org Subject: Re: [ISC-Bugs #36101] IDN support in host/dig/nslookup using GNU libidn(2) Return-Path: X-Original-To: bind-suggest@bugs.isc.org Thread-Index: taCKiuDTlh1ejPX+I6oS5pll03vLJQ== Date: Wed, 28 May 2014 12:10:23 -0400 (EDT) Thread-Topic: IDN support in host/dig/nslookup using GNU libidn(2) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mx.pao1.isc.org X-Originating-Ip: [10.5.82.11] To: bind-suggest@isc.org Content-Transfer-Encoding: 7bit From: Tomas Hozza RT-Message-ID: Content-Length: 2625 ----- Original Message ----- > On Tue May 27 16:33:14 2014, thozza@redhat.com wrote: > > > > - introduce new configure option to turn on the usage of GNU > > libidn > > > > (something like --with-gnu-libidn) > > > > - use libidn2 for IDN -> ACE conversion (as libidn2 suppoerts > > IDNA2008 [1] > > > > whereas libidn supports only IDNA2003) > > > > - use libidn for ACE -> IDN conversion where needed (as libidn2 > > apparently > > > > does not include support for this) > > > > > > Pardon my confusion here, but do you mean that two different > > versions > > > of libidn would be in use at the same time? > > > > Well I have to admit that I was also little bit confused when looking > > at the idnkit > > code in dighost.c. > > > > The process seems to work like this: > > 1. the domain name from the CLI is converted to UTF-8 > > 2. the origin is converted to UTF-8 > > 3. UTF-8 domain name and UTF-8 origin are joined. > > 4. the joined domain name is conveted to the translated IDN name (ACE) > > > > 5. there is output_format() function for converting the translated > > IDN ascii (ACE) name to locale when printing it to the CLI. > > > > Now the "old" a.k.a. IDNA2003 library "libidn" has all the necessary > > functions (part of stringprep.h) for conversions of locale <-> UTF-8 > > <-> ACE. > > > > However the libidn2 (IDNA2008) library has only functions for > > conversion > > of locale -> translated IDN as UTF-8 and UTF-8 -> translated IDN as > > UTF-8. > > > > But I think there is still need for the functions to convert the > > translated IDN in UTF-8 > > to ACE, locale -> UTF-8 without the IDN translation, ACE -> locale (in > > output_filter). > > > > There is library libunistring that could solve this, but it is also > > yet another > > library. > > Looking at the official libidn2 web page[1], it says: > > "Libidn2 uses GNU libunistring for Unicode processing and GNU libiconv > for character set conversion." > > So it seems that they intend you to use libiconv for converting between > the locale and UTF-8. > > > > > [1] https://www.gnu.org/software/libidn/#libidn2 My bad. I missed this one. However I'm not sure if it makes sense to support IDNA2003 and IDNA2008 at the same time and let the user to choose the standard by some runtime option. I think it makes some sense, but I'm not sure if it is worth the effort. I'll wait for your opinion and work on the separate support in the meantime. Thank you. Regards, -- Tomas Hozza Software Engineer - EMEA ENG Developer Experience PGP: 1D9F3C2D Red Hat Inc. http://cz.redhat.com