UTF-8 decoding issue
Posted: Fri Jan 06, 2023 11:44 pm
Hi everyone, i've stumbled nto an UTF-8 decoding issue.
I've made a function to fetch all files from a specified path.
everything is working well, but when checking a certain folder content, my program would crash saying :
UTF-8 decoding error: Invalid UTF-8
i've checked with the file explorer to see what could cause such an issue, and i've found the problem.
It was simply a file with a 'é' character that caused the crash. Once i renamed the file and removed the 'é',
everything was ok.
I'm kinda puzzled how I could solve this issue, it seems to me that it is a LOVE UTF-8 decoding issue
btw, i simply used io.popen("dir ./path/ /b /a-d") and inserted every lines in a table. In case it should help to specify where that character comes from exactly. And when it crashe4d exactly is when i try to use 'love.graphics.print' with that string i got from the 'dir' command.
could someone help me out with that please?
I've made a function to fetch all files from a specified path.
everything is working well, but when checking a certain folder content, my program would crash saying :
UTF-8 decoding error: Invalid UTF-8
i've checked with the file explorer to see what could cause such an issue, and i've found the problem.
It was simply a file with a 'é' character that caused the crash. Once i renamed the file and removed the 'é',
everything was ok.
I'm kinda puzzled how I could solve this issue, it seems to me that it is a LOVE UTF-8 decoding issue
btw, i simply used io.popen("dir ./path/ /b /a-d") and inserted every lines in a table. In case it should help to specify where that character comes from exactly. And when it crashe4d exactly is when i try to use 'love.graphics.print' with that string i got from the 'dir' command.
could someone help me out with that please?