davidm/luacom — pull request #6 by windtail (2012-09-06 13:55:14+00:00)
Title: correct bstr conversion

hi davidm,

When i use luacom, i found that i cannot used it with Chinese characters: either filename with Chinese characters nor string parameters with Chinese characters.

i tried to save the lua source file to UTF-8 format, but that could not solve the filename with Chinese characters, because i cannot change the system's encoding.

Later, i found it works with Cygwin, then i realized that the newest Cygwin internally convert filename to UTF-8.

i download the source code today, and i think in function bstr2string()/string2bstr() CP_UTF8 should be changed to CP_ACP when not using with Cygwin (see commit changes). The changes work for me, but i do not known if it will cause other errors.

luojiejun