[gdal-dev] The new @filename syntax and UTF-8 with BOM
Even Rouault
even.rouault at spatialys.com
Tue Oct 13 08:38:31 PDT 2015
Le mardi 13 octobre 2015 13:10:04, Jukka Rahkonen a écrit :
> Hi,
>
> While testing the new ogr2ogr and ogrinfo option that was introduced in
> https://trac.osgeo.org/gdal/changeset/30859 for reading contents for the
> -where and -sql parameters from a file by using the @filename syntax I
> noticed that system fails if the option file is saved with the Byte order
> mark (BOM)
>
> ERROR 1: SQL Expression Parsing Error: syntax error, unexpected end of
> string. Occured around :
> ´╗┐{"query":
>
> If I save the option file as UTF-8 without BOM then the file is read
> correctly. Could GDAL be made to clarify the BOM if it exists, or should we
> document that BOM is banned?
Oh well, just added the code to remove the UTF-8 BOM marker if found...
>
> And now I understand why some of my mapfiles which I had to convert into
> UTF-8 for Mapserver v. 7.0 did not work - the same BOM issue there.
>
> -Jukka Rahkonen-
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list