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]

Re: iconv problem


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


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