diff options
author | gjb <gjb@FreeBSD.org> | 2013-11-29 19:44:30 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2013-11-29 19:44:30 +0000 |
commit | 79d300c715848b1fff97d4e74e56c9c1b079e5b0 (patch) | |
tree | 617b6871ac0e81d0dfbf5a38172aed46e8dc844c /lib/libc/iconv/iconvctl.3 | |
parent | 3dff623eb742454b39c54adaaca545d1638dcfd8 (diff) | |
download | FreeBSD-src-79d300c715848b1fff97d4e74e56c9c1b079e5b0.zip FreeBSD-src-79d300c715848b1fff97d4e74e56c9c1b079e5b0.tar.gz |
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
Diffstat (limited to 'lib/libc/iconv/iconvctl.3')
-rw-r--r-- | lib/libc/iconv/iconvctl.3 | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/libc/iconv/iconvctl.3 b/lib/libc/iconv/iconvctl.3 index f012157..5bd06ea 100644 --- a/lib/libc/iconv/iconvctl.3 +++ b/lib/libc/iconv/iconvctl.3 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2009 +.Dd November 25, 2009 .Dt ICONVCTL 3 .Os .Sh NAME @@ -110,6 +110,31 @@ variable, which is passed to via .Fa argument by its address. +.It ICONV_GET_ILSEQ_INVALID +Determines if a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +The answer is stored in +.Fa argument , +which is of +.Ft int * . +It will be set to 1 if this feature is enabled or set to 0 otherwise. +.It ICONV_SET_ILSEQ_INVALID +Sets whether a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +If +.Fa argument , +which is of +.Ft int * +is set to 1 it will be enabled, +and if +.Fa argument +is set to 0 it will be disabled. .El .\" XXX: fallbacks are unimplemented and trying to set them will always .\" return EOPNOTSUPP but definitions are provided for source-level |