bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iconv module should detect buggy glibc iconv


From: Reuben Thomas
Subject: iconv module should detect buggy glibc iconv
Date: Sat, 18 Feb 2023 22:17:44 +0000

See https://sourceware.org/bugzilla/show_bug.cgi?id=29913

This is a bug I just came across (in my capacity as maintainer of Recode) in current glibc.

glibc iconv(3) can return EILSEQ when the input is merely untranslatable, rather than invalid. This is directly contrary to the POSIX spec[1], which says:

[EILSEQ]
Input conversion stopped due to an input byte that does not belong to the input codeset.
And:

If iconv() encounters a character in the input buffer that is valid, but for which an identical character does not exist in the target codeset, iconv() shall perform an implementation-defined conversion on this character.

So, it would be nice if gnulib detected this problem. (Then I would of course use GNU libiconv!)

[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html
--
https://rrt.sc3d.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]