[Bug locale/13541] iconv //IGNORE charsets are inconsistent about INBUF* state after EILSEQ
michael at orlitzky dot com via Glibc-bugs <[email protected]> Wed, 08 Jul 2026 00:53:59 +0000
| Newsgroups | gmane.comp.lib.glibc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=13541
Michael Orlitzky <michael at orlitzky dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |michael at orlitzky dot com
--- Comment #5 from Michael Orlitzky <michael at orlitzky dot com> ---
I think there are two related problems here.
First: iconv() fails with EILSEQ when it hits invalid input, which is OK, but
it also fails with EILSEQ when it hits untranslatable input. This is bug 14008.
(If the glibc implementation followed POSIX here, your example would not
required //IGNORE at all.)
Second: appending //IGNORE to the destination codeset doesn't work as expected
or documented. POSIX says that both invalid and untranslatable input should be
ignored. The glibc manual says that untranslatable input will be ignored, and
is vague about invalid input. In practice however, neither are ignored; we get
EILSEQ for both.
--
You are receiving this mail because:
You are on the CC list for the bug.