citrus/BSD iconv doesn't respect ICONV_SET_DISCARD_ILSEQ flag
Andrey Chernov
ache at freebsd.org
Sun Apr 9 13:06:32 UTC 2017
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.
More information about the freebsd-i18n
mailing list