[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: iconv limitations
On Thu, Apr 08, 2004 at 04:17:41AM -0400, Michael B Allen wrote:
> > - knows that the input is zero terminated
>
> I have great difficulty in envisioning the opposite. Binary file formats
> and network protocols have a lot of zero terminated strings in all sorts
> of encodings.
>
> > - does not know whether this is an 8-bit, 16-bit or 32-bit
> > wide and aligned zero
>
> Again for me it's rare that an application would not need to know what
> data it's dealing with. Applications do not exist in a vacuum. You have to
> do I/O in which case the the encoding of text is usually predefined or
> negotiated. You do not always have the luxury of defining how text is
> represeted throughout the system.
However, the case where 1: data is zero-terminated *and* 2: you don't at
least know whether you're dealing with an 8-, 16- or 32-bit encoding is,
in my experience, non-existant. After all, "zero-terminated" is
meaningless unless you know what "zero" means--an 8-bit, 16-bit or
32-bit zero?
--
Glenn Maynard
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/