[gdal-dev] UTF-8 strings being re-encoded to LATIN1 with ogr2ogr
Christy Nieman
cnieman at dmsolutions.ca
Mon May 9 09:56:14 EDT 2011
Frank,
Sorry, I forgot to specify the driver. And yes, it's the shapefile
driver. I'll give the SHAPE_ENCODING override a shot.
Christy
On 05/09/2011 09:52 AM, Frank Warmerdam wrote:
> On 11-05-09 08:24 AM, Christy Nieman wrote:
>> Hello,
>>
>> I compiled gdal from trunk last week, and noticed that ogr2ogr keeps
>> converting
>> UTF-8 strings to LATIN1. The only thing I've been able to find that's
>> remotely
>> 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?
>
> Christy,
>
> Are you speaking about with shapefiles? Recently a first effort was
> made to
> apply encoding conversions to and from shapefiles. There is a
> configuration
> options for the shapefile driver that can be used to override it's
> concept
> of what the encoding of the shapefile is or should be. If you want to
> avoid
> conversions you should be able to set it to "UTF-8".
>
> eg.
>
> 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
> specific.
>
> Best regards,
More information about the gdal-dev
mailing list