I am trying to upload data of MULTIPOINTS for listed buildings in Wales in shapefile format to a PostgreSQL database I have run the command below:
ogr2ogr -progress -update -append -f PostgreSQL "PG:dbname=dbtest2 host=localhost port=5432 user=user password=password" -lco LAUNDER=YES -lco GEOMETRY_NAME=geom -nln $LAYER -nlt MULTIPOINT -sql "select test_SHP_COLUMNS from test_SHP_LAYER" -dialect sqlite --config PG_USE_COPY YES -gt 655360 test_SHP
having in return this errors:
ERROR 1: COPY statement failed. ERROR: invalid byte sequence for encoding "UTF8": 0xe7 0x61 0x64 CONTEXT: COPY listed_buildings, line 2
I have used the same code for a similar layer of Multipoints and it works perfectly, but some rows in the table of the layer I am trying to upload with the previous command.
Do you know how can I deal with this?