On Mon, 7 Dec 1998, Otto Stolz wrote:
> In order to process data in various encodings, such as ISO 8859-1, UTF-8,
> and Unicode (UTF-16), a programm has to know about the encoding of the
> actual data. Hence, I cannot understand how a program, such as Vi, could
> work with a locale that does not cover the encoding.
No, it doesn't have to know about the encoding; the encoding is
part of the locale which is external to the program. POSIX
specifies where the en/decoding takes place, but not what the
For example, your program calls fgetwc() to read a character from
a file, the setting of LC_CTYPE tells fgetwc() what algorithm to
use for mapping the imput into the wchar_t (well, wint_t in this
case) datatype. This should work for any single or multi-byte
encoding supported by the locale library of the OS.
This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:43 EDT