Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:" 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 UTF-8 or 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?

share|improve this question
I haven't had exactly that error, but encodings can really be a pain sometimes :) – Chau Sep 10 '10 at 6:54
up vote 6 down vote accepted

Greek isn't LATIN1, try

share|improve this answer
Oh, and in the "teach a man to fish" category, I found that answer here: – Paul Ramsey Sep 10 '10 at 14:40

some great looking documentation in this google search. convert latin to unicode

share|improve this answer
which google search? – underdark Sep 12 '10 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.