Re: SET client_encoding = 'UTF8' - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: SET client_encoding = 'UTF8'
Date
Msg-id 482FEAC5.7010904@opencloud.com
Whole thread Raw
In response to Re: SET client_encoding = 'UTF8'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
Tom Lane wrote:
> Daniel Migowski <dmigowski@ikoffice.de> writes:
>> The command
>>     SET client_encoding = 'UTF8'
>> throws an exception in the driver, because the driver expects UNICODE.
>
> Er, what driver exactly?  Perhaps you need a more up-to-date version
> of said driver?  'UTF8' has been our standard spelling of this
> encoding's name for quite some time now.

The driver requests client_encoding = UNICODE in the startup packet, and
expects client_encoding to stay as UNICODE throughout.

If client code goes off and manually sets it to UTF8 then the JDBC
driver complains, because it doesn't know that UNICODE is equivalent to
UTF8.

-O


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: SET client_encoding = 'UTF8'
Next
From: Daniel Migowski
Date:
Subject: Re: SET client_encoding = 'UTF8'