Artikash / Textractor

Extracts text from video games and visual novels. Highly extensible.
GNU General Public License v3.0
2.09k stars 203 forks source link

Support for switching Text Encoding #12

Closed shoaibshakeel381 closed 6 years ago

shoaibshakeel381 commented 6 years ago

First of all, love this. It's definitely an improvement over ITHVNR.

So, I was looking at multiple different versions of ITH and never found a generic solution for switching Text encodings, like VNR has. Can you please bring that functionality in here. User should be able to switch text encoding of grabbed text from UI at runtime. Mainly used encodings are Shift-JIS, UTF-8 and UTF-16.

Artikash commented 6 years ago

There is support for S-JIS and UTF-16. I've never found a VN that uses only UTF-8 as Windows APIs for drawing text accept only 'codepage' (S-JIS as well as other encodings for specific foreign languages) and UTF-16, so I haven't bothered adding it

shoaibshakeel381 commented 6 years ago

There are a few new games with UTF-8 text captured through H-Codes. I'll formatted my hard drive a few days ago otherwise I would have provided you with examples.

Anyways, I still think that a UI control for switching encodings manually would be the best choice for handling all scenarios, even the ones you as a developer haven't tested yet. Application will become a bit more generic due to this. And Users will be able to decide what encoding to use in their situations. You could only add UTF-16 and Shift-JIS encodings in that control.

Artikash commented 6 years ago

It's exceedingly rare that NH gets the text encoding wrong, if it does you can just copy the H code from the dropdown and change the second letter which specifies the encoding, and then add it. It's not a common enough use case that I want to put it on the GUI

I will add UTF-8 support though, should be in v2.0.2

Artikash commented 6 years ago

Alright, utf-8 support added