PostgreSQL8.1 “client encoding mismatch” with ODBC
Friday, December 2nd, 2005While connecting to PostgreSQL using UnixODBC (from R, but this doesn’t matter) I got the following error:
[unixODBC]client encoding mismatch
It seems that there is some problem with PostgreSQL 8.1 and the encoding names: see this post or google. It looks that UTF8 used by default with the new Postgres is not compatible with old ODBC drivers. I am not sure where the problem really is, but a quick fix is to change default encoding for the user connecting to the database:
alter user <user> SET client_encoding to LATIN1;