Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C64112E0109 for ; Fri, 22 Feb 2008 10:21:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76009-02 for ; Fri, 22 Feb 2008 10:21:06 -0400 (AST) Received: from beaver.fastcrypt.com (beaver.fastcrypt.com [64.7.141.17]) by postgresql.org (Postfix) with ESMTP id 5EA362E00E8 for ; Fri, 22 Feb 2008 10:21:06 -0400 (AST) Received: from [192.168.1.14] (dcdsl.ebox.com [64.7.143.116]) by beaver.fastcrypt.com (Postfix) with ESMTP id DA0BC158036C; Fri, 22 Feb 2008 09:24:37 -0500 (EST) Cc: pgsql-jdbc@postgresql.org Message-Id: From: Dave Cramer To: Ivo Danihelka In-Reply-To: <1203689294.4960.56.camel@localhost> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: UTF8 should be accepted as UNICODE Date: Fri, 22 Feb 2008 09:21:03 -0500 References: <1203689294.4960.56.camel@localhost> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/176 X-Sequence-Number: 18383 Ivo, What it's actually telling you is that you shouldn't attempt to change it. It's already set to UNICODE But it should probably ignore your attempt, since it has no effect. Dave On 22-Feb-08, at 9:08 AM, Ivo Danihelka wrote: > 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 > > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend