Skip to content

Commit bfe2383

Browse files
committed
Add some encoding format support.
1 parent 20e0620 commit bfe2383

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/main/java/io/github/fvarrui/javapackager/utils/CharSetUtil.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.BufferedReader;
44
import java.io.InputStreamReader;
55
import java.nio.charset.Charset;
6+
import java.nio.charset.StandardCharsets;
67
import java.util.regex.Matcher;
78
import java.util.regex.Pattern;
89

@@ -15,8 +16,13 @@ public static Charset getCommandLineChartSet(){
1516
String res = br.readLine();
1617
String code = find("\\d+",res);
1718
switch (code){
18-
case "936": return Charset.forName("GBK");
19-
case "65001": return Charset.forName("UTF-8");
19+
case "037": return Charset.forName("IBM037");
20+
case "936": return Charset.forName("gb2312");
21+
case "950": return Charset.forName("big5");
22+
case "1145": return Charset.forName("IBM01145");
23+
case "1200": return StandardCharsets.UTF_16;
24+
case "51936": return Charset.forName("EUC-CN");
25+
case "65001": return StandardCharsets.UTF_8;
2026
}
2127
}catch (Exception e){
2228
}

0 commit comments

Comments
 (0)