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](http://archives.postgresql.org/pgsql-odbc/2005-09/msg00161.php) or [google](http://www.google.com/search?q=%22client+encoding+mismatch%22+postgres). 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