lua-users home
lua-l archive

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


Andrew Wilson wrote:
To display try chcp 65001, to use UTF-8 you with lfs you probably have
to convert UTF-8 to UTF-16 and then use lfs calls. And nope I haven't
tried any of this.   AGRW

lfs can't use UTF-8 or UTF-16.

On Sun, Sep 6, 2009 at 1:32 AM, KHMan<keinhong@gmail.com> wrote:
Andrew Wilson wrote:
It seems you need to set current console code page to 65001 using chcp
command, see following email discussion.

http://www.digitalmars.com/d/archives/digitalmars/D/13971.html
Not really IIRC. With "chcp 65001", the console works fine in displaying
UTF-8, but lfs.dll does not use widechar calls, so it won't work with UTF-8
filenames and directory names. The Apache Portable Runtime on Win32, for
example, has to explicitly use the widechar API calls. Are you sure your
suggestion works?

On Fri, Sep 4, 2009 at 12:41 PM, Tuomo Valkonen<tuomov@iki.fi> wrote:
Is there some way to make LuaFileSystem to use UTF-8 on
Windows? Currently it seems to use some character set
(winlatin1?) that can not represent all the characters
in use: string.len of lfs.dir results equals the length
of the string printed on the console, which is full of
question marks for characters not covered by a single
byte. So the results of lfs.dir seem to be full of
non-existent files.

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