This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

iconv_open behaviour on EILSEQ



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]