summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2013-11-25 01:26:06 +0000
committerhrs <hrs@FreeBSD.org>2013-11-25 01:26:06 +0000
commit150d294dbc6b55504998d6f99781473171415f7f (patch)
tree7c53259610137077d7bca0370a6246a61e862300 /include
parent4e34b845870b14e6d758cd141e7c08f5225ae940 (diff)
downloadFreeBSD-src-150d294dbc6b55504998d6f99781473171415f7f.zip
FreeBSD-src-150d294dbc6b55504998d6f99781473171415f7f.tar.gz
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;).
Diffstat (limited to 'include')
-rw-r--r--include/iconv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/iconv.h b/include/iconv.h
index da1036a..c07d02e 100644
--- a/include/iconv.h
+++ b/include/iconv.h
@@ -86,6 +86,8 @@ void iconv_set_relocation_prefix(const char *, const char *);
#define ICONV_SET_DISCARD_ILSEQ 4
#define ICONV_SET_HOOKS 5
#define ICONV_SET_FALLBACKS 6
+#define ICONV_GET_ILSEQ_INVALID 128
+#define ICONV_SET_ILSEQ_INVALID 129
typedef void (*iconv_unicode_char_hook) (unsigned int mbr, void *data);
typedef void (*iconv_wide_char_hook) (wchar_t wc, void *data);
OpenPOWER on IntegriCloud