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

Re: Charset problem on WHERE clause

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Charset problem on WHERE clause
Date: 2004-07-26 21:09:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Kris Jurka wrote:

> You should not use a SQL_ASCII database.  The JDBC driver requires you 
> database to use a proper encoding for your data.  The ?charSet url 
> parameter was designed to work around this problem for <= 7.2 servers 
> which didn't come with multibyte encoding support compiled by default, but 
> it is ignored in => 7.3 servers so it is useless here.

I wonder if it's worth supporting the charSet parameter even for >= 7.3: 
set client_encoding explicitly to SQL_ASCII (which I believe means "no 
translation") and do the translation to Unicode on the JVM side using 
whatever charset the user provided. I think most of the encoding details 
are now isolated from the rest of the protocol logic, so it wouldn't be 
a very invasive change.

My only concern is that it'd encourage people to keep their DBs as 
SQL_ASCII .. which is just delaying the problem.


In response to


pgsql-jdbc by date

Next:From: Oliver JowettDate: 2004-07-26 21:17:45
Subject: Re: Binary Cursors, and the COPY command
Previous:From: Tom LaneDate: 2004-07-26 20:03:03
Subject: Re: Problem w/ IDENT authentication

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