This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
iconv_open behaviour on EILSEQ
- From: Stefan Hoffmeister <bug dot glibc-gnu dot org at econos dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Sat, 04 May 2002 19:33:27 +0200
- Subject: iconv_open behaviour on EILSEQ
- Organization: Econos
Hi,
the glibc documentation for iconv_open states
<quote>
EILSEQ
The conversion stopped because of an invalid byte sequence in the input.
After the call *inbuf points at the first byte of the invalid byte
sequence.
</quote>
Empirically, I can see that *outbuf and *outbytesleft have been modified
to reflect the successful conversions up to the point where the
character triggering EILSEQ is located.
Is this behaviour merely a side-effect of the current implementation, or
is that behaviour that should be documented for glibc (and that one can
rely on)?
SUSv2 is completely silent about the state of anything in the presence
of EILSEQ; same problem in the last publicly accessible draft of SUSv3.
FWIW, I like the current behaviour, but since the docs for EILSEQ don't
describe what I see, I feel uncomfortable exploiting it.
Thanks very much,
Stefan