Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

UTF8 should be accepted as UNICODE



The Postgresql JDBC driver does not accept this statement:
SET client_encoding = 'UTF8';

It fails with:
"org.postgresql.util.PSQLException: The server's client_encoding
parameter was changed to UTF8. The JDBC driver requires client_encoding
to be UNICODE for correct operation."

I consider that to be a bug. The UNICODE is an alias for UTF8. 

Starting from 8.2, the pg_dump exports 'UTF8'
even when --encoding=UNICODE is used.
See:
$ pg_dump --version
pg_dump (PostgreSQL) 8.2.6
$ pg_dump --encoding=UNICODE template1 | grep client_encoding
SET client_encoding = 'UTF8';


The check for value.equals('UNICODE') is inside
org/postgresql/core/v3/QueryExecutorImpl.java

Thanks for the driver,
-- 
Ivo Danihelka




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group