Why does iconv signal EILSEQ whith legal sequences (deviation from standard?)

Paul Eggert eggert@CS.UCLA.EDU
Thu May 18 16:54:00 GMT 2006


>> 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() performs an implementation-dependent conversion on this
>> character.
>
> The GNU implementations of iconv() - those in glibc and in libiconv
> - prefer to return in this case, like in the case of invalid input,
> with errno = EILSEQ.

My interpretation is that this behavior conforms to the standard,
since the phrase "an implementation-dependent conversion" can be
interpreted to mean a conversion that rejects the character.  If there
is some dispute in this matter, we could ask for an official
interpretation where both sides could be heard.



More information about the Libc-alpha mailing list