[gdal-dev] Ogr2ogr from Spatialite into PostGIS stops to non-ASCII character

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Jun 13 05:57:11 PDT 2012


Jeff McKenna <jmckenna <at> gatewaygeomatics.com> writes:

 
> Hmm I have had to use the magical "-W" switch before with shp2pgsql to
> specify encoding; I wonder if with ogr2ogr you should pass a "-sql"
> switch with something like "SET CLIENT_ENCODING to UTF8" ?  But I
> haven't tested that.

It reads actually in the documentation http://gdal.org/ogr/drv_pg.html
Giving SET PGCLIENTENCODING=LATIN1 before running ogr2ogr helped. I had tried
first something that I read from the internet by giving 
--config PGCLIENTENCODING LATIN1 but it did not work for me. One must not rely
on everything that is in the web.

-Jukka-


> 
> -jeff
> 






More information about the gdal-dev mailing list