diff --git a/src/main/java/featurecat/lizzie/rules/SGFParser.java b/src/main/java/featurecat/lizzie/rules/SGFParser.java index 3962e3f82..f2e9cf733 100644 --- a/src/main/java/featurecat/lizzie/rules/SGFParser.java +++ b/src/main/java/featurecat/lizzie/rules/SGFParser.java @@ -40,6 +40,7 @@ public static boolean load(String filename) throws IOException { } String encoding = EncodingDetector.detect(filename); + if (encoding == "WINDOWS-1252") encoding = "gb2312"; FileInputStream fp = new FileInputStream(file); InputStreamReader reader = new InputStreamReader(fp, encoding); StringBuilder builder = new StringBuilder(); @@ -279,7 +280,8 @@ private static BoardHistoryList parseValue( line2 = lines[1]; } String versionNumber = line1[0]; - line1[1] = line1[1].replaceAll(",", "."); // fix a decimal representation localization issue + line1[1] = + line1[1].replaceAll(",", "."); // fix a decimal representation localization issue Lizzie.board.getData().winrate = 100 - Double.parseDouble(line1[1]); int numPlayouts = Integer.parseInt(