CogentRedTester / mpv-user-input

API to allow mpv scripts to request user text input

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rename.lua can not input chinese characters, although show chinese character is fine

royaso opened this issue · comments

How are you trying to type in characters?

I use RIME squirrel to input chinese character. not worked.
then, I changed to macos system provided chinese input method, not worked neither.

then, I tried to paste some chinese characters into it.
just some '?' question marks show up.

after hitting enter, only '?'question marks show up in vedio file name.

only happens when I tried to input chinese words, but english letters works fine.

rename.lua is the only mpv plugin that can rename currently playing vedio file I can find. But without being able to input chinese characters, It would be useless.

please help.

The text input used by user-input is not a usual text box, it uses the raw key inputs sent to the mpv window, which may not work with the software you're using. It uses the same code as console.lua, an inbuilt mpv script that uses an input box for sending commands to mpv. Improving support of the input box for unicode characters is beyond the scope of this script, but you are welcome to make the request on the main mpv player repository. I add any changes to console.lua to this script to maintain consistency.

On windows, I did manage to type in characters by launching mpv from the terminal and typing into there, so that is an option:

image

Copying and pasting also worked for me on windows, it should be working for you, but if it's not then it might be a problem with the copy/paste code on MacOS. I don't have a MacOS device, so I can't test, but that would probably be a valid bug report to file on mpv-player/mpv.

Thanks a lot!

I tried to use mpv in terminal this time, still not able to input chinese characters, but when I pasted chinese character, It show up!

I guess that is what I have to do.

thanks.

Do note that the paste not working from the window is a bug worth reporting to the mpv developers, I'd look into it myself if I had a MacOS device.

I dont know how to report to mpv developers.
it is very kind of you for doing that.