Open jaruba opened 9 years ago
Actually I am using jschardet, but only to detect if the encoding is utf-8. If it's not utf-8, I'm using some kind of language-encoding mapping, since the language of the subtitle is known. I'm not sure if this approach is more precise than jschardet though. But the user can change encoding manually as well, so it shouldn't be a big deal.
Best module I know for this is: https://www.npmjs.com/package/jschardet
It should be noted that subtitle encoding is never 100%, no matter how good the module is, the issue comes from extremely similar encodings that can be mistaken for one another.