lua-users home
lua-l archive

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


On Fri, Aug 17, 2012 at 7:49 AM, Paul K <paulclinger@yahoo.com> wrote:
>> winapi.set_encoding(winapi.CP_UTF8)
>> winapi.short_path("d:/Lua/下载/foo.lua")
> "d:/Lua/D7A9~1/foo.lua"

I should make this requirement more explicit. Internally, winapi
always uses the W versions, and translates from the _current_ encoding
to UTF-16.

Your point about optionally not creating the path is good: Dimiter's
point about 8.3 filenames is worrying.

Alas, writing portable C code to create Lua file objects is hard,
because of the representation differences between 5.1/5.2/LuaJIT. (I
once ended up reusing a fair chunk of iolib.c in an extension, and I'm
sure I wasn't the only one)

steve d.