This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: iconv problem
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-alpha at sources dot redhat dot com
- Cc: Tobias Hunger <tobias at fresco dot org>
- Date: Wed, 30 Oct 2002 20:54:58 +0100 (CET)
- Subject: Re: iconv problem
- References: <200210300134.29490.tobias@fresco.org>
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