Io.popen function special letters problem (SOLVED)

Hi, I’m programming a file browser on the Windows platform, using io.popen () to get the names of the folders and files in the repository. Everything works great until there is a special letter in the name of a folder. The function then replaces the letter with the � character, and it is not possible to continue exploring the repository. In the Czech language, for example, we have letters such as č, ř, š. But undoubtedly many other alphabets also have special letters. Therefore, I would like to work around it somehow, but it seems to me that the function io.popen really only returns this character �. Can anyone think of a solution?

Yeah, you should use LFS. There’s a Defold port for it floating around. https://github.com/britzl/defold-lfs/releases/tag/1.0.1

Docs here: http://keplerproject.github.io/luafilesystem/manual.html

lfs.dir() is probably what you want

3 Likes

Thank you very much @dapetcu21 , it works great.