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

Re: SET client_encoding = 'UTF8'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Migowski <dmigowski(at)ikoffice(dot)de>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: SET client_encoding = 'UTF8'
Date: 2008-05-19 14:03:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Daniel Migowski <dmigowski(at)ikoffice(dot)de> writes:
> Kris Jurka schrieb:
>> On Sun, 18 May 2008, Daniel Migowski wrote:
>>> The command SET client_encoding = 'UTF8'
>> throws an exception in the driver, because the driver expects UNICODE.
>> This has been discussed before and the problem is that there are a too 
>> many ways to say UTF8 [1].  You can say UTF8, UTF-8, UTF -- 8, and so 
>> on. Perhaps we should strip all spaces and dashes prior to comparison?

Perhaps we should make the backend return the values of client_encoding
and server_encoding in canonical form (ie, "UTF8") regardless of the
spelling variant the user used.  I'm not thrilled with having JDBC
thinking it knows the conversion algorithm the backend uses.

Of course, such a change would break code relying on the older behavior

			regards, tom lane

In response to


pgsql-jdbc by date

Next:From: Oliver JowettDate: 2008-05-19 15:39:47
Subject: Re: SET client_encoding = 'UTF8'
Previous:From: Daniel MigowskiDate: 2008-05-19 08:18:01
Subject: Re: SET client_encoding = 'UTF8'

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