[gdal-dev] PGCLIENTENCODING in ogr2ogr (and QGIS)

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Tue Nov 30 13:08:52 PST 2021


Hi,

Would you mind to include your whole ogr2ogr command (no passwords etc.) and if possible, link to some small shapefile? And confirm that your aim is to save shapefiles with Latin1 encoding into PostGIS database that is using UTF-8 encoding.

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: matteo <matteo.ghetta at gmail.com> 
Lähetetty: tiistai 30. marraskuuta 2021 13.05
Vastaanottaja: Even Rouault <even.rouault at spatialys.com>; Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi>; gdal-dev at lists.osgeo.org
Aihe: Re: [gdal-dev] PGCLIENTENCODING in ogr2ogr (and QGIS)

Hi Rahkonen and Even,

thanks for the answers. If I add -oo PRELUDE_STATEMENTS="SET client_encoding TO LATIN1" the I get this error:

Warning 6: driver ESRI Shapefile does not support open option PRELUDE_STATEMENTS

and I think it that makes sense because I want to put in a UTF8 DB some
LATIN1 shapefiles.

BTW: the shapefiles have been created with ogr2ogr from within QGIS (on a Linux computer), opened and edited on QGIS on Windows machines.

Other ideas are more than welcome!

Cheers!

Matteo


More information about the gdal-dev mailing list