use module unicode flag for using unicode on dir and attributes#1
use module unicode flag for using unicode on dir and attributes#1sonoro1234 wants to merge 32 commits intospacewander:masterfrom
Conversation
|
First of all, thanks for your pull request. Unfortunately, the Windows support of this luafilesystem is far from perfect. To be honest, I consider this luafilesystem is just a toy project. The root cause is, Windows (and other OS) deeply use macros to hide the platform difference, and LuaJIT FFI can't detect these macros. Take The We could make a guess. With |
|
Yes but vanilla luafilesystem is not using unicode in windows. There is a pull request for this but it seems unattended!! |
|
also according to https://msdn.microsoft.com/es-es/library/14h5k7ff.aspx |
|
@sonoro1234 |
|
In case you use windows: How are you dealing with chinese caracters in file names or paths with lfs? |
|
Actually I am a server-side programmer. I use LuaJIT within OpenResty. If I have to handle unicode characters, I perfer to write scripts in Python 3 or Ruby, which have good unicode support. |
|
@sonoro1234 |
[Fix for Winx64] Change windows find handle type to intptr_t
declare ssize_t for LuaJIT 2.0
…er advise when not defined (LuaJIT 2.0), undo previous commit of lalawue.
merge from origin
Support BSD stat
add arm64
fix typo: _utime632 -> _utime32
local lfs = require"lfs_ffi"
lfs.unicode = true
for file in lfs.dir([[c:/luaGL/frames_anima/luajit_test/]]) do print(file);print(file:byte(1,#file)) end
things left mkdir, chdir ,set correct MAX_PATH and do winx64 also
Also corrected a problem when compiling with mingw64 (32 bits) where _findfirst32 is exported as _findfirst
Solution was trying with pcall
Appveyor test is failing for x64 but I only changed x32