lua-users home
lua-l archive

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

----- Original Message -----
From: Jerome Vuarand
Date: 7/22/2009 10:18 AM
I have a patch (attached) replacing win32 API calls with the wide
versions, with the help of a couple helper functions (lua_towstring,
lua_pushwstring) that convert between utf-8 (Lua side) and utf-16
(win32 side). You can use that as a basis to replace all appropriate
clib calls. I have more complete wstring management functions in
another lib if you're interested (lua_tolwstring, lua_pushlwstring,
luaL_*, etc.).
FWIW, LuaPlus ( has wide string support. It is probably similar to your patch, but the wide string functionality is built into the language itself. It can even read UCS-2 .lua files. Be sure to grab latest Subversion from svn:// Everything is #ifdef'ed. Look for LUA_WIDESTRING and LUA_WIDESTRING_FILE.