lua-users home
lua-l archive

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


2009/10/15 uri cohen <uri.cohen@gmail.com>:
> I was able to create a UTF16 port of LUA for windows, by following the
> guidelines I found at http://lua-users.org/lists/lua-l/2002-12/msg00021.html
> and the considerations from
> http://lua-users.org/lists/lua-l/2002-12/msg00025.html. This is a version of
> LUA where all internal strings are UTF16 (wide characters) rather than
> chars, not a version with two types of strings like LuaState.
>
> My question is on how can I verify my port works? Other than toy scripts I
> created, I'm looking for a comprehensive set of tests I can run in order to
> verify all important language feature were not broken...

I think you should make sure your "port" doesn't break libraries that
use strings for non-text data. For examples, you can try to use the io
library on binary files (use one of the (de)serialization libraries
available around), or LuaSocket on binary protocols.

By the way, what's the goal of such a modification of Lua ? If all you
need is being able to use Unicode filenames on windows, a simpler
approach is to assume filenames passed to Lua are in utf-8 format, and
convert it just when necessary when accessing the filesystem (in just
a very few places in Lua source code). I have a patch doing that if
anyone is interested.