Date: Sun, 9 Apr 2017 16:06:24 +0300 From: Andrey Chernov <ache@freebsd.org> To: Lev Serebryakov <lev@FreeBSD.org>, freebsd-i18n@freebsd.org Subject: Re: citrus/BSD iconv doesn't respect ICONV_SET_DISCARD_ILSEQ flag Message-ID: <53b57139-8e68-da83-8fe8-e132ea524b6d@freebsd.org> In-Reply-To: <137414834.20170409140646@serebryakov.spb.ru> References: <137414834.20170409140646@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09.04.2017 14:06, Lev Serebryakov wrote:
> I understand, that iconvctl(3) is GNU extension, but as soon as citurs
> iconv used by FreeBSD libc formally supports this API and
> ICONV_SET_DISCARD_ILSEQ flag, they should work, IMHO. But they don't. If I
> try to convert simple UTF-8 string with illegal sequence to ASCII (all
> legal character in this string is ASCII), it stops on illegal sequence and
> returns error. GNU iconv from ports works correctly. I didn't try UTF-16
> and UTF-32/UCS-4, but by looking at code, I'm afraid, they have same
> problems.
I need to add that our iconv also don't support anything after //
forcing ports using GNU iconv:
/*
* 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.
*/
//ignore is analogue of ICONV_SET_DISCARD_ILSEQ on.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53b57139-8e68-da83-8fe8-e132ea524b6d>
