iconv: Sync#2 - Support ICONV_{GET,SET}_ILSEQ_INVALID
authorJohn Marino <draco@marino.st>
Fri, 10 Jan 2014 00:06:03 +0000 (01:06 +0100)
committerSascha Wildner <saw@online.de>
Fri, 10 Jan 2014 18:55:01 +0000 (19:55 +0100)
commit9d94407120498b0331be09b25c4786a98396c14e
tree0d4bd44a931ae1f96b411ffe95ec1da452450327
parentcb6e5c39e9e691650ca81227c84ab3510e27673d
iconv: Sync#2 - Support ICONV_{GET,SET}_ILSEQ_INVALID

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;).

Taken verbatim from:
FreeBSD SVN 258537 (24 NOV 2013)
include/iconv.h
lib/i18n_module/iconv_std/citrus_iconv_std.c
lib/libc/citrus/citrus_iconv_local.h
lib/libc/iconv/iconv.c
lib/libc/iconv/iconvctl.3