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.ghe...@gmail.com> Lähetetty: tiistai 30. marraskuuta 2021 13.05 Vastaanottaja: Even Rouault <even.roua...@spatialys.com>; Rahkonen Jukka (MML) <jukka.rahko...@maanmittauslaitos.fi>; gdal-dev@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 _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev