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

Free yjacolin at free.fr
Wed Jun 13 05:59:42 PDT 2012


Le mercredi 13 juin 2012 12:57:11 Jukka Rahkonen a écrit :
> 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.
Hello,

I already used something like this sucessfully:

export PGCLIENTENCODING=LATIN1
ogr2ogr flags dst source

Regards,

Y.


More information about the gdal-dev mailing list