Charset problem on WHERE clause - Mailing list pgsql-jdbc

From smota
Subject Charset problem on WHERE clause
Date
Msg-id a8bb739d04072607204610c2ce@mail.gmail.com
Whole thread Raw
Responses Re: Charset problem on WHERE clause
List pgsql-jdbc
Hi,

I'm pretty new to PostgreSQL as well to it's JDBC driver.

For now I'm using PostgreSQL 7.3.6 version under Red Hat ES 3.0.
The database is created with SQL_ASCII encoding.
I'm retriving data from the database with the pg74.214.jdbc3.jar driver.

Some fields contains values with accents (characters like Ç, Ã, Õ, etc.) ...

I've set the connection string with
jdbc:postgresql://10.100.1.11:5432/mydatabase?charSet=LATIN1

On java code I must get the fields with new
String(result.getBytes(1),"ISO-8859-1") to have accentued chars
correctly displayed .....

My problem is when I get an accentued character on a WHERE expression,
it doesn't return any value.
I've tried field IN (to_char('MANUTENÇÃO', 'LATIN1')) ... but with no success.

Any idea or help on this?

On time ... using pgAdminIII or the line command psql tool both works
with the accents on WHERE clause.

Thanks

pgsql-jdbc by date:

Previous
From: Paul Thomas
Date:
Subject: Re: Problem w/ IDENT authentication
Next
From: "Nick Fankhauser"
Date:
Subject: Re: Problem w/ IDENT authentication