[gdal-dev] "Assign character encoding" option for GML driver

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Oct 31 03:26:42 PDT 2012


Hi,

Let's say I have some date which use internally ISO-8859-1 encoding in Oracle or
MapInfo files and I want to convert data into GML.  It goes OK by using
configuration option --config OGR_FORCE_ASCII NO. However, after doing so the
GML data are in the native encoding (ISO-8859-1 in this case) but the first line
of the GML file is always advertising UTF-8 encoding. It is not a big deal to
open the GML file once it is ready, edit the first line and save again for
getting a valid GML file. However, it feels unnecessary because I know
beforehand that encoding is ISO-8859-1 and I could very fine give the encoding
as a parameter for the ogr2ogr command of as an environment variable. We have an
analogy in the -a_srs parameter which handles the case when user knows the
projection code but GDAL doesn't.

Regards,

-Jukka Rahkonen-



More information about the gdal-dev mailing list