DroidFish: Ignore UTF8 byte order mark when reading PGN files.

This commit is contained in:
Peter Osterlund 2013-07-08 20:01:19 +00:00
parent c2427ac4c3
commit fdb4d70cbb

View File

@ -137,6 +137,11 @@ public class PGNFile {
int len = line.length();
if (len == 0)
continue;
if ((filePos == 0) && (len > 1) && (line.charAt(0) == '\uFEFF')) {
line = line.substring(1);
len--;
filePos += 3;
}
boolean isHeader = line.charAt(0) == '[';
if (isHeader) {
if (!line.contains("\"")) // Try to avoid some false positives