lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Friday 18 February 2005 12:36, Glenn Maynard wrote:
> Probably by having the application that's using Lua do the appropriate
> conversion to UTF-8 at the entry/exit points,
yes

> and using setlocale() to change the locale to UTF-8.
don't! It's not working by any means.

> "Support" in what way?  What operations do you want to do?  You can do
> things like substring searches on UTF-8 without any extra code. 
right (while this does not hold in general for multi-byte charsets)

> Regexes/gsub is harder (eg. "[äï]" should be a set of two letters,
> regardless of encoding). I don't know if that's supported
it is for UTF-8

> --it would come at a performance
sure, but not as bad as one might expect

> 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).

> If you don't understand i18n in general, you can't really understand
> how to deal with it in Lua.
sad but true



regards