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_H3,RCVD_IN_MSPIKE_WL,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: <1807512246.5806763.1401107982420.JavaMail.zimbra@redhat.com> <1738085611.5809889.1401108711247.JavaMail.zimbra@redhat.com> <20140526160753.GA58166@isc.org> Message-ID: <2058734996.6124128.1401208390989.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 792FC2D20571 for ; Tue, 27 May 2014 16:33:14 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mx.pao1.isc.org (Postfix) with ESMTP id 50A643493A2 for ; Tue, 27 May 2014 16:33:12 +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 mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4RGXBl4026964 for ; Tue, 27 May 2014 12:33:11 -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: ZFxjTXqhTd5b5wtfLJ9nk6+jKqW6Gg== Date: Tue, 27 May 2014 12:33:10 -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.12] To: bind-suggest@isc.org Content-Transfer-Encoding: 7bit From: Tomas Hozza RT-Message-ID: Content-Length: 2286 ----- Original Message ----- > > I'm not sure if there is already a ISC-Bugs # number for this. However > > I would like to know if you would be interested in adding support > > for libidn. > > Yes. Great! > > - 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. Maybe it would make sense to add compile time option for libidn, which would be used by default if compiled with it. Then provide yet another compile time option to use also libidn2 in addition to the libidn library and make the usage of it dependent on some runtime option (like -8 meaning IDNA2008 or something different). I'm open to any suggestions. Maybe I missed something... Thanks! Regards, -- Tomas Hozza Software Engineer - EMEA ENG Developer Experience PGP: 1D9F3C2D Red Hat Inc. http://cz.redhat.com