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

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Jun 13 06:46:12 PDT 2012


Jukka Rahkonen <jukka.rahkonen <at> mmmtike.fi> writes:

> 
> 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.

Next trouble: I would now take the data back from PostGIS into Spatialite (it
was much faster to do some processing with PostGIS) but the happens again: my
non-ascii characters are converted to something invalid. I cannot see any
SQLITECLIENTENCODING option or anything.

-Jukka Rahkonen-





More information about the gdal-dev mailing list