pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivo Danihelka <ivo.danihelka@itonis.tv>
To: pgsql-jdbc@postgresql.org
Subject: UTF8 should be accepted as UNICODE
Date: Fri, 22 Feb 2008 15:08:14 +0100
Message-ID: <1203689294.4960.56.camel@localhost> (raw)

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




view thread (3+ messages)  latest in thread

Message-ID: <1203689294.4960.56.camel@localhost>
Permalink:  ../1203689294.4960.56.camel@localhost/
Also on:    postgresql.org/message-id/1203689294.4960.56.camel@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: ivo.danihelka@itonis.tv
  Subject: Re: UTF8 should be accepted as UNICODE
  In-Reply-To: <1203689294.4960.56.camel@localhost>
  References: <1203689294.4960.56.camel@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox