From: Avinal Kumar Date: Mon, 2 Feb 2026 15:26:13 +0000 (+0100) Subject: manual: Document //TRANSLIT and //IGNORE support in iconv_open [BZ #3794] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dd9951d85bc84ec104dda97fd1d3c5e8166f49e;p=thirdparty%2Fglibc.git manual: Document //TRANSLIT and //IGNORE support in iconv_open [BZ #3794] The //TRANSLIT and //IGNORE suffix supported by iconv_open was not documented in the glibc manual. This commit adds the documentation for the suffixes. This fixes BZ #3794. Signed-off-by: Avinal Kumar Reviewed-by: Florian Weimer --- diff --git a/manual/charset.texi b/manual/charset.texi index b10d0b33c7..adab4cf934 100644 --- a/manual/charset.texi +++ b/manual/charset.texi @@ -1687,6 +1687,24 @@ source and destination character set for the conversion, and if the implementation has the possibility to perform such a conversion, the function returns a handle. +The @var{tocode} argument may optionally be suffixed with +@code{//TRANSLIT}. When this suffix is present, transliteration is +enabled. With transliteration enabled, characters that cannot be +represented directly in the destination character set may be approximated +using one or more similar characters that are available in the +destination character set. Characters outside of the destination +character set and cannot be transliterated are replaced with a question +mark @code{?}. + +The @var{tocode} argument may also be suffixed with @code{//IGNORE}. +When this suffix is present, characters that cannot be converted are +silently discarded. + +The suffixes may be combined, for example @code{//TRANSLIT,IGNORE}. +When both suffixes are specified, transliteration is attempted first. +If a character cannot be transliterated, it is then handled according +to @code{//IGNORE}. + If the wanted conversion is not available, the @code{iconv_open} function returns @code{(iconv_t) -1}. In this case the global variable @code{errno} can have the following values: