mpv-scripts icon indicating copy to clipboard operation
mpv-scripts copied to clipboard

When copying Japanese subtitles, it just copies question marks

Open elysxm opened this issue 4 years ago • 8 comments

When copying Japanese subtitles, it just copies question marks

im very sorry if this is the wrong place to report this or if i had just configured something wrong, i have no idea how github works. thank you.

elysxm avatar Apr 27 '21 10:04 elysxm

@titor004 Thanks for reporting an issue. I just tested the script on my system with a Japanese subtitle and it worked fine. Would you mind telling what operating system you're on? I tested it on a Mac, so the issue is probably OS-specific.

linguisticmind avatar May 06 '21 12:05 linguisticmind

hm, i'm on Windows 10

elysxm avatar May 06 '21 18:05 elysxm

@titor004 Thanks for the info, and sorry for the late reply. It's a character encoding issue with clip.exe. Problem is, I'm not a Windows user, so fixing this is a bit more challenging than it would be for Mac or Linux. I'm planning to release some new scripts for mpv, so I'll try to look into that while preparing those for release. In the meanwhile, if someone who reads this issue has a clue to what's going on, feel free to leave a comment here or submit a pull request.

linguisticmind avatar Oct 08 '21 17:10 linguisticmind

After I sent my last message, I changed something in my mpv script which then unintentionally fixed the problem I had with the question marks. I think I switched something to do with the subtitle settings, and then it worked. I don't remember exactly what, though.

However, when I try to copy anything that has parenthesis, the extension would tell me "Subtitle copied to clipboard" but then didn't actually copy anything. Here's a gif of it attached. I think this only happens when it's like a few parentheses, as opposed to just something like: (パン). Although, it has not worked when it was just a pair of parentheses. It was a big problem when there was furigana within parentheses. FlC01YSAfj

Also if you have the caps lock button on, it also won't work. This isn't really a big deal, but it was a little annoying if I had the button on.

I recently switched to a different extension, so I don't remember the problems that I had, but those were the main two.

elysxm avatar Oct 09 '21 08:10 elysxm

@titor004 Thanks for the information. When you say you switched to a different extension, do you mean a different mpv script? If so, could you tell me what it is, because then I might be able to take a look at how they did it and figure out how to fix it in this script. Also, the parentheses thing makes sense. It probably happens when you have the "regular" Western-style parentheses, not Japanese parentheses: ( ) as opposed to ( ). Looks like an escaping issue. I might be able to fix that, but I'm not 100% sure yet.

linguisticmind avatar Oct 09 '21 12:10 linguisticmind

Yeah, that's what I meant, a different mpv script. https://animecards.site/minefromanime/ and this https://anacreondjt.gitlab.io/docs/mpvscript/. The first link is explaining how it works and the second one is the creator's actual website. The extension works a little differently than yours, as it automatically copies every line.

That probably makes sense. I have no clue though, I didn't pay that much attention to what parentheses it had haha

elysxm avatar Oct 09 '21 20:10 elysxm

@titor004 Thanks, I'll take a look.

linguisticmind avatar Oct 10 '21 19:10 linguisticmind

I'd like to copy the subtitle withou the space+new line the script gives.

KonoVitoDa avatar Dec 16 '22 08:12 KonoVitoDa