AFAICT iconv(3) requires that the length of the input be known in advance.
This is very unfortunate for zero terminated strings as it requires the
user inspect the string in an encoding specific way to determine it's
length. Is there simply no way around this?
Mike
--
Linux-UTF8: i18n of Linux
AFAICS it expects the length of the input in bytes, so you simply
pass strlen() for zero-terminated strings.
behdad
On Wed, 7 Apr 2004, Michael B Allen wrote:
> AFAICT iconv(3) requires that the length of the input be known in advance.
> This is very unfortunate for zero terminated strings as
Behdad Esfahbod wrote on 2004-04-07 09:02 UTC:
> On Wed, 7 Apr 2004, Michael B Allen wrote:
> > AFAICT iconv(3) requires that the length of the input be known in advance.
> > This is very unfortunate for zero terminated strings as it requires the
> > user inspect the string in an encoding specific
On the other hand, I have great difficulty to envision a real-world
situation, where the user of iconv
- knows that the input is zero terminated
- does not know whether this is an 8-bit, 16-bit or 32-bit
wide and aligned zero
Perhaps hes writing a function which wraps iconv, and converts
z