lua-users home
lua-l archive

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


Thomas Harning Jr. wrote:
On Wed, Jul 22, 2009 at 11:26 AM, Bulat Ziganshin wrote:

    Hello Thomas,

    Wednesday, July 22, 2009, 6:55:56 PM, you wrote:

     > Has anybody come up with solutions?  The only reasonably solution I
     > can think of is to have 'replacement' APIs at boundaries that
     > send/receive certain text from the OS...

    i don't understand that you mean by "replacement APIs". i think the
    best way is to provide C low-level functions that implements open,
    popen, getenv functionality using utf8-encoded strings (internally
    converting them to/from utf-16) and use in io/os packages these
    functions instead of usual ones

What you've just described /is/ the replacement API I was thinking about.

Has anyone already performed this work (making a 'lightweight' wrapper for Windows to make Lua operate like this)"?

Oh, just forgot, it has already been done, check apr, the Apache Portable Runtime, the file i/o uses all sorts of UTF-something. There might be a binding available, but I am too lazy to check the wiki...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia