Is there any way to extract the encoding, like utf8, from a shapefile?
I want to be able to write a script that enables the user to import shapefiles without having to worry about which encoding the file. I'm using shp2pgsql but here I have to specify which encoding to import with...
I have a script that's written in SQL using gdal-tools. I would like to extend the script with either:
somehow extracting the encoding of the shapefile to be able to use shp2pgsql to import or,
is there some way to magically say "import with the encoding that is set in the file"?
I'm no programmer at heart, mearly faking it with SQL...
.cpg
suffix file, but it's neither required nor used by all shapefile readers. – Vince Feb 22 '18 at 14:16