From owner-freebsd-ports@FreeBSD.ORG Fri Dec 6 02:47:24 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1019488E for ; Fri, 6 Dec 2013 02:47:24 +0000 (UTC) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 563341193 for ; Fri, 6 Dec 2013 02:47:22 +0000 (UTC) Received: (qmail 20703 invoked by uid 89); 6 Dec 2013 02:47:22 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@88.217.181.118) by mail.grem.de with ESMTPA; 6 Dec 2013 02:47:22 -0000 Date: Fri, 6 Dec 2013 03:47:22 +0100 From: Michael Gmelin Cc: freebsd-ports@freebsd.org Subject: Re: Differences between iconv from ports and iconv in base (transliteration) Message-ID: <20131206034722.1267aab5@bsd64.grem.de> In-Reply-To: <20131206001554.0d9d3e23@bsd64.grem.de> References: <20131206001554.0d9d3e23@bsd64.grem.de> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2013 02:47:24 -0000 On Fri, 6 Dec 2013 00:15:54 +0100 Michael Gmelin wrote: > I'm in the process of changing ports from ports iconv to iconv in > base. I noticed that transliteration doesn't work in base as it does > with iconv from ports. Examples: > > "T\xc5\xbdst" > ports: "TZst" > base: "Tst" > > "T\xe2\x82\xacst" > ports: "TEURst" > base: "Tst" > > Conversion done using: > iconv_open("ISO8859-1//IGNORE//TRANSLIT", "UTF-8"); > > Any ideas? > I just checked /usr/src/lib/libc/iconv, it says in iconv_open: /* * Remove anything following a //, as these are options (like * //ignore, //translate, etc) and we just don't handle them. * This is for compatibility with software that uses these * blindly. */ So basically any software that depends on using these options will break. The porters handbook doesn't mention the fact that converters/libiconv and native iconv are not equivalent [1]. I think this is problematic. [1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-iconv.html -- Michael Gmelin