[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The World According to Lua: How To?
- From: Glenn Maynard <glenn@...>
- Date: Fri, 18 Feb 2005 15:39:44 -0500
On Fri, Feb 18, 2005 at 02:15:47PM +0100, Klaus Ripke wrote:
> > and using setlocale() to change the locale to UTF-8.
> don't! It's not working by any means.
In C? Of course it is. (Never in Lua--an extension language can't be
changing the locale environment, since it's shared by its parent.)
> > --it would come at a performance
> sure, but not as bad as one might expect
GNU grep is much slower in UTF-8 than without multibyte support. :(
> > and portability cost.
> no, to the very opposite: while the C API locale support will vary largely,
> standard unicode support is 100% portable in Java and Tcl
> and hence in the provided little lib (which is a port from Tcl).
Huh? Lua is written in C, not Java or Tcl. There are "portable" mechanisms
for localization (eg. wctomb(), wcwidth(), wchar_t and friends), but not
all systems have them (Windows, embedded systems, etc).
--
Glenn Maynard