From 79d300c715848b1fff97d4e74e56c9c1b079e5b0 Mon Sep 17 00:00:00 2001 From: gjb Date: Fri, 29 Nov 2013 19:44:30 +0000 Subject: MFC r258537, r258587: r258537 (hrs): 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;). r258587 (peter): Move the iconv wrapper source from libc_nonshared to libc/iconv so that it is all in the one place again. Rename libc/iconv/iconv.c to bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT works again. Approved by: re (kib) Sponsored by: The FreeBSD Foundation --- include/iconv.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/iconv.h') 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); -- cgit v1.1