UTF-8 library
Joe English
jenglish@flightlab.com
Thu, 08 Aug 2002 13:01:19 -0700
anatoli wrote:
> I'd still rather associate locale with a handle. This way, all
> Char and String IO functions that exist, and those that are not
> written yet, can work with any encoding without relying on the
> abomination that is setlocale().
Seconded; this is the best approach. The libc locale could
be consulted to determine the initial or default encoding,
or it could just be ignored (I'd vote to ignore it; setlocale()
*is* an abomination.)
BTW, this is how Tcl does it -- each file handle has an associated
encoding (which may be changed on the fly) -- and it's very convenient.
--Joe English
jenglish@flightlab.com