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