Lifting GB2312 to GB18030

This commit is contained in:
Glavo authored and Yuhui Huang committed 2021-12-18 15:59:24 +08:00
1 parent 3a5e8a827c
commit fbf7ff6ebd
1 file changed
+2 -1
@@ -124,9 +124,10 @@ public enum OperatingSystem {
if (nativeEncoding != null && !nativeEncoding.equalsIgnoreCase(nativeCharset.name())) {
nativeCharset = Charset.forName(nativeEncoding);
}
if (nativeCharset == StandardCharsets.UTF_8 || nativeCharset == StandardCharsets.US_ASCII) {
nativeCharset = StandardCharsets.UTF_8;
} else if ("GBK".equalsIgnoreCase(nativeCharset.name())) {
} else if ("GBK".equalsIgnoreCase(nativeCharset.name()) || "GB2312".equalsIgnoreCase(nativeCharset.name())) {
nativeCharset = Charset.forName("GB18030");
}
}