Hi Rahkonen,

sorry for the delay. The command, built with Processing in QGIS using the GdalUtils utility is at the end:

ogr2ogr -f PostgreSQL "PG:dbname='db' host=myhost port=myport user='myuser' password='mypassword' sslmode=disable schemas=myschema" shapefile.shp --config PG_USE_COPY YES -append -skipfailures -nlt PROMOTE_TO_MULTI -doo PRELUDE_STATEMENTS="SET client_encoding TO LATIN1"

a small file can be found here:

https://faunalia.eu/~matteo/shapefile.zip

and yes. The database encoding is:

HOW SERVER_ENCODING;
 server_encoding
-----------------
 UTF8
(1 row)

while the encoding of the shapefile is ISO-8859-1

Thanks for any hint!

Matteo



_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to