Similar to another question I posted previously, I'm trying to import datasets from Esri geodatabases into a PostGIS database directly, and inside the data there are greek letters and symbols that are not converting correctly. I tried using FWTools on Windows with a command like this:
ogr2ogr -f "PostgreSQL" PG:"host=server.domain.com user=gisuser dbname=gis" dataset.mdb LayerName -a_srs EPSG:4326
The first time I tried, I got this error from ogr2ogr:
ERROR 1: INSERT command for new feature failed.
ERROR: invalid byte sequence for encoding "UTF8": 0xb4
HINT: This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".
I found out that setting a particular environment variable at the Windows command line can fix this issue:
That fixed importing problem -- all the records and geometry are in PostGIS, but as a result, the non-english characters are not encoded correctly. When I use
UTF8 for client encoding (not sure which is correct), I get the same invalid byte sequence error as above. Has anyone else had this problem or found a way around it? Is this an issue with the .mdb file itself, or is there something on the server I can change to globally correct this?