mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-18 11:42:17 +01:00
DroidFish: Ignore UTF8 byte order mark when reading PGN files.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user