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

UTF8 should be accepted as UNICODE

From: Ivo Danihelka <ivo(dot)danihelka(at)itonis(dot)tv>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: UTF8 should be accepted as UNICODE
Date: 2008-02-22 14:08:14
Message-ID: 1203689294.4960.56.camel@localhost (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
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.
$ 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

Thanks for the driver,
Ivo Danihelka


pgsql-jdbc by date

Next:From: Dave CramerDate: 2008-02-22 14:21:03
Subject: Re: UTF8 should be accepted as UNICODE
Previous:From: Oliver JowettDate: 2008-02-22 11:46:50
Subject: Re: Problem executing remote SELECT's (through internet) with JDBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group