poxu / runmpv

Runner, which allows to have only one mpv instance on Windows and Linux
6 stars 0 forks source link

Japanese Filenames can't be opened with clicking on the file #45

Open FeyrisTan opened 2 years ago

FeyrisTan commented 2 years ago

^ Title.

When I click on them nothing happens. If i do it in mpv (im using uosc) i can select it just fine there.

Or even just special Symbols.

poxu commented 2 years ago

Interesting. I'll try renaming one of my videos using japanese symbols. Could you send an example of such a file name? So that I could reproduce it on my machine?

FeyrisTan commented 2 years ago

13 戦場

poxu commented 2 years ago

Thank you very much! I have reproduced the issue on Ubuntu 20.04 . I might take me a couple of hours to find the root cause. I hope I'll release the fix today or tomorrow

poxu commented 2 years ago

It looks like the problem on my machine wasn't caused by filename, but by changes I made for development. So, if I copy and paste 13 戦場 to filename, runmpv opens a video. Could you try doing it with newer runmpv version? https://github.com/poxu/runmpv/releases/download/v2.3.10/runmpv-linux-x86_64-v2.3.10.zip

A have fixed a couple of bugs, which didn't let runmpv to successfully write logs . I'd appreciate if you tried to open the file with this version of runmpv and then sent the contents of ~/runmpv.log here. But just in case, be aware, that runmpv logs full path to opened files.

FeyrisTan commented 2 years ago

No log file is being generated. I even opened it with cmd and then calling runmpv.exe. Nothing is being shown.

Still not working - and used the newest one.

Should specify its windows. Maybe runmpv gets confused when a filename is linked to it with special characters?

poxu commented 2 years ago

Oh, it's windows. Sorry, my bad, I should've asked (( . I'll try windows right now.

FeyrisTan commented 2 years ago

Also just realized focusAfterOpen does not work on windows right now.

I think it worked before (older version).

poxu commented 2 years ago

Ok, that's a bad one (( . runmpv is written in java and as far as I understand java wants utf-8 encoded command line arguments. And windows doesn't do that by default. If you're using windows 10, then you cant try enabling utf-8. Shouldn't be hard. Here's a manual I found https://winaero.com/change-system-locale-in-windows-10/ .

I tried that, runmpv starts to read arguments correctly, but still doesn't launch videos. I'm working on understanding why.

And, which version of mpv are you using? focusAfterOpen implementation was reworked and needs newer version of mpv now.

FeyrisTan commented 2 years ago

Im using the latest mpv version (just updated today).

poxu commented 2 years ago

Hello again. I was able to reproduce focusAfterOpen not working and I'll work on it.

Now, about not being able to open files with javanese names (all non english names really). Long story short, java can to do that. I never thought it'll end like this, but it seems I'd have to make a launcher for runmpv, which is a launcher for mpv ))). Just to read file names properly. Shouldn't be too hard, since I use Visual Studio to build runmpv for windows anyway.

Still, if everything is fine it might take a week or two. But I'll make it my main priority.

FeyrisTan commented 2 years ago

Take your time ^^. For now Im just building msix with newest mpv build in visual studio.