lua-users home
lua-l archive

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


On Tue, 6 Nov 2001, Gary Makin wrote:

> I've been converting a project over to support Unicode as much as possible.
> I've just got to the Lua section of it, and I was surprised to see that, as
> far as I can tell, the Lua code has no support for being passed a Unicode
> block of text, or to execute code that's in a Unicode formatted text file.
>
> Am I wrong in this, and if not, is this something that's planned for the
> future?

Another option for Unicode in Lua is to use RTF-8. Because Lua is 8-bit
clean, most parts of Lua should work without change when fed with RTF-8
strings. As far as I can see, the lexer should also work OK (assuming that
non-ascii chars only happen inside string literals or comments). Only the
string library would fail miserably (even strlen!). But, depending on how
much you use from it, it should be easy to convert those functions to
RTF-8.

-- Roberto