iconv problem

Bruno Haible bruno@clisp.org
Wed Oct 30 11:56:00 GMT 2002


Tobias Hunger writes:
> retval is -1, errno == E2BIG, out_buf_bound is 0, all as
> expected. But inbuf_bound is still 11 and out_buf contains a value
> of 65279. Is that what is supposed to happen? Why got out_buf
> written into but in_bound not decremented accordingly?

UTF-32 encoded streams, as specified by the RFC, start with a byte
order mark. (You didn't specify UTF-32BE or UTF-32LE, right?) So
glibc starts out by writing the byte order mark to the output region,
before consuming anything from the input region. It's all as it should
be.

Bruno



More information about the Libc-alpha mailing list