-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lua scripts are not loaded if there are non-Latin characters in the username #7701
Comments
Yes, that's because we let Lua open the file. Windows is an absolutely braindead piece of shit, so you need extra hacks to even open a file that has non-ASCII parts in its name or path, and Lua didn't implement these hacks. |
Is it possible to fix this? AppData seems to work fine in Lua with portable_config. My mistake. I found a workaround - setting MPV_HOME to a DOS path, for example: |
Probably trivial to fix, someone just has to do it. |
PS: and at least half the cursing goes to MinGW and their shitmess too, because they force EVERYONE to reimplement wrappers for open/fopen and any other standard C functions which take filenames. |
This particular issue is probably solved now, but Lua filesystem functions in general are not affected by this change. |
Bill Gates did not only create COVID, he's also responsible for the world's worst OS, where you have to literally jump through hoops of fire to open files with Unicode file names. Lua did not care to implement any jumping, so it's our turn to jump. Untested (on win32). Fixes: #7701
Thank you! |
The problem occurs when there are non-Latin characters in AppData path.
Also, some lua scripts cannot save files toWorks.%AppData%\mpv
folder even with portable_config.Important Information
Reproduction steps
C:\mpv\Настройки
.C:\mpv\Настройки\scripts
folder.set MPV_HOME=C:\mpv\Настройки
.Expected behavior
Scripts loaded
Actual behavior
Lua error: cannot open C:\Users\Андрей\AppData\Roaming\mpv/scripts/autoload.lua: No such file or directory
Log file
output.txt
The text was updated successfully, but these errors were encountered: