Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQ
authorhrs <hrs@FreeBSD.org>
Mon, 25 Nov 2013 01:26:06 +0000 (01:26 +0000)
committerhrs <hrs@FreeBSD.org>
Mon, 25 Nov 2013 01:26:06 +0000 (01:26 +0000)
commit150d294dbc6b55504998d6f99781473171415f7f
tree7c53259610137077d7bca0370a6246a61e862300
parent4e34b845870b14e6d758cd141e7c08f5225ae940
Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl.  GNU iconv returns EILSEQ
when there is an invalid character in the output codeset while it is
valid in the input.  However, POSIX requires iconv() to perform an
implementation-defined conversion on the character.  So, Citrus iconv converts
such a character to a special character which means it is invalid in the
output codeset.

This is not a problem in most cases but some software like libxml2 depends
on GNU's behavior to determine if a character is output as-is or another form
such as a character entity (&#NNN;).
include/iconv.h
lib/libc/iconv/citrus_iconv_local.h
lib/libc/iconv/iconv.c
lib/libc/iconv/iconvctl.3
lib/libiconv_modules/iconv_std/citrus_iconv_std.c