mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-02-20 02:57:53 +01:00
DroidFish: Ignore UTF8 byte order mark when reading PGN files.
This commit is contained in:
parent
c2427ac4c3
commit
fdb4d70cbb
|
@ -137,6 +137,11 @@ public class PGNFile {
|
||||||
int len = line.length();
|
int len = line.length();
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
continue;
|
continue;
|
||||||
|
if ((filePos == 0) && (len > 1) && (line.charAt(0) == '\uFEFF')) {
|
||||||
|
line = line.substring(1);
|
||||||
|
len--;
|
||||||
|
filePos += 3;
|
||||||
|
}
|
||||||
boolean isHeader = line.charAt(0) == '[';
|
boolean isHeader = line.charAt(0) == '[';
|
||||||
if (isHeader) {
|
if (isHeader) {
|
||||||
if (!line.contains("\"")) // Try to avoid some false positives
|
if (!line.contains("\"")) // Try to avoid some false positives
|
||||||
|
|
Loading…
Reference in New Issue
Block a user