This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Why does iconv signal EILSEQ whith legal sequences (deviation from standard?)
- From: Paul Eggert <eggert at CS dot UCLA dot EDU>
- To: Bruno Haible <bruno at clisp dot org>
- Cc: Alexander Shopov <ash at contact dot bg>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 18 May 2006 09:54:19 -0700
- Subject: Re: Why does iconv signal EILSEQ whith legal sequences (deviation from standard?)
- References: <200605181818.39315.bruno@clisp.org>
>> 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.