Skip to content
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

Error load script with non-english dir name #4903

Closed
kesdoputr opened this issue Sep 20, 2017 · 5 comments
Closed

Error load script with non-english dir name #4903

kesdoputr opened this issue Sep 20, 2017 · 5 comments
Labels
core:option-param-conf config, parameters, properties, options, shortcuts core os:win

Comments

@kesdoputr
Copy link

mpv version and platform

mpv 0.27.0 x64 from https://mpv.srsfckn.biz/
windows7 SP1 x64

Reproduction steps

If mpv is located in a directory and the name is not english,i test in chinese japanese and korean dir name.
mpv can play file but lua script load error and show no such file or dir.

Log file

It's a sample when i use chinese dir name.
http://i.imgur.com/5L2a6Tp.png

I don't know if it is a bug or not,thanks for watching.

@Geograph-us
Copy link

Geograph-us commented Jan 7, 2019

I have the same bug in mpv 0.29.0-107

Windows 10 x64 - cyrillic-path to folder "portable_config".
LUA-scripts can't load but JS-scripts load successful.

I think the LUA-library which used in MPV can't work correctly with Windows path (in ANSI encoding) and tries to work with UTF-8 path.

@Geograph-us
Copy link

Geograph-us commented Jan 7, 2019

Temporary solution - loading scripts manually from mpv.conf (file must be in ANSI encoding):

load-scripts=no
script=C:\Плееры\MPV\portable_config\scripts\mines.lua
script=C:\Плееры\MPV\portable_config\scripts\youtube-quality.lua

@zc62
Copy link
Contributor

zc62 commented Feb 21, 2019

This is very OS specific. In Linux, even I use convmv to rename a lua script to other non-UTF-8 encodings, the lua script still loads. It depends on the Windows open file API the upstream lua uses.

Don't know if mpv could translate the path string so that lua will accept it. It is possible that the lua library does not use a Windows open file API that supports UTF-8 path at all. In this case, even if mpv could translate the path, open file may still fail. And there are several different lua implementations that one can choose to build mpv with. One may work and another may not.

The best solution for now might be, just do not put mpv in a non-English directory. Something like C:\mpv\ should work just fine. If you insist on organizing portable programs in a non-English directory, probably it's time to change your habit.

@garoto
Copy link
Contributor

garoto commented Feb 22, 2019

Computers should be operated in an ASCII mode mindset when naming files and dirs that you have control of, regardless where you are in the world or what your native language is. Saying this as someone whose native language is full of çáéúõ and useless shit like that.

Surely this approach to all things computing always seemed like the less painful one in my experience.

@Dudemanguy
Copy link
Member

Dudemanguy commented Jul 21, 2021

I think this pretty much just OS-dependent. I have no knowledge of what windows does here, but I don't think trying trying to figure out some kind of workaround/hack for this is worth it.

Edit: Actually wm4 supposedly did it (c258478).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:option-param-conf config, parameters, properties, options, shortcuts core os:win
Projects
None yet
Development

No branches or pull requests

6 participants