[gdal-dev] UTF-8 strings being re-encoded to LATIN1 with ogr2ogr
cnieman at dmsolutions.ca
Mon May 9 09:56:14 EDT 2011
Sorry, I forgot to specify the driver. And yes, it's the shapefile
driver. I'll give the SHAPE_ENCODING override a shot.
On 05/09/2011 09:52 AM, Frank Warmerdam wrote:
> On 11-05-09 08:24 AM, Christy Nieman wrote:
>> I compiled gdal from trunk last week, and noticed that ogr2ogr keeps
>> UTF-8 strings to LATIN1. The only thing I've been able to find that's
>> related to this is OGR_EDIGEO_RECODE_TO_UTF8 at the bottom of
>> http://trac.osgeo.org/gdal/wiki/ConfigOptions which appears to be a
>> way to
>> prevent the opposite of what is happening. Tested with 1.8 and it
>> works as
>> expected (i.e. UTF-8 string stay in UTF-8).
>> Has anyone else seen this?
> Are you speaking about with shapefiles? Recently a first effort was
> made to
> apply encoding conversions to and from shapefiles. There is a
> options for the shapefile driver that can be used to override it's
> of what the encoding of the shapefile is or should be. If you want to
> conversions you should be able to set it to "UTF-8".
> ogr2ogr --config SHAPE_ENCODING UTF-8 out.shp in.mif
> If it is another driver you are working with then you will need to be
> Best regards,
More information about the gdal-dev