1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-25 18:49:16 +02:00

Added support for OziExplorer files with UTF8 BOMs

This commit is contained in:
2018-06-02 16:41:27 +02:00
parent 815cb6cb91
commit ec247d5d1d
2 changed files with 8 additions and 4 deletions

View File

@ -26,7 +26,8 @@ int MapFile::parse(QIODevice &device, QList<CalibrationPoint> &points,
QByteArray line = device.readLine();
if (ln == 1) {
if (!line.trimmed().startsWith("OziExplorer Map Data File"))
QString fileType(QString::fromUtf8(line).trimmed());
if (!fileType.startsWith("OziExplorer Map Data File"))
return ln;
} else if (ln == 2)
_name = line.trimmed();