Added GB2312 workaround

This commit is contained in:
M66B 2021-10-31 12:40:50 +01:00
parent d63a9664f8
commit 0593c6afcf
1 changed files with 4 additions and 0 deletions

View File

@ -65,6 +65,10 @@ public class UnknownCharsetProvider extends CharsetProvider {
if (name.contains("UTF8") || name.contains("UTF-8")) // //TRANSLIT
return StandardCharsets.UTF_8;
// https://charset-normalizer.readthedocs.io/en/latest/support.html
if (name.contains("GB2312"))
name = "GB2312";
if (TextUtils.isEmpty(name) ||
name.contains("ASCII") ||
//name.startsWith("ISO8859") ||