Date: Fri, 6 Dec 2013 03:47:22 +0100 From: Michael Gmelin <freebsd@grem.de> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Dec 2013 00:15:54 +0100 Michael Gmelin <freebsd@grem.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131206034722.1267aab5>