tronkko / dirent

C/C++ library for retrieving information on files and directories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Japanese Filenames in large folders get returned as ?

RomanDietenmeier opened this issue · comments

commented

If I try reading Japanese filenames in small directories theres no problem.
But as I do it in a folder with 800 files+ the type of files including Japanese chars is 0 and the name is ?

Could you please provide a zip or tar package with a few troublesome file names? The files may be empty, only the file names matter.

commented

Filenames
The type of this files is 0 and they're name is ? and I can guarantee that this files work just fine.
As I copy these files into another directory it recognizes these files but with different names: Filenames.
I don't know how windows handles these filenames but it's super weird to me.
best regards Arkanipro

You could try wide-character versions _wopendir and _wreaddir instead of opendir and readdir. Alternatively, try changing the Windows locale to UTF-8.

Could you also confirm with dir /x command that the files do have traditional 8+3 file names. Perhaps the files were stored on a disk which did not support 8+3 file names.

commented

Thank you for solving my problem and I am also sorry, because I didn't know the library well.
Using _wopendir and _wreaddir solved my problem
Thanks