Charset problem on WHERE clause

From: smota <samuelmota(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Charset problem on WHERE clause
Date: 2004-07-26 14:20:40
Message-ID: a8bb739d04072607204610c2ce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nick Fankhauser 2004-07-26 14:43:07 Re: Problem w/ IDENT authentication
Previous Message Paul Thomas 2004-07-26 11:50:21 Re: Problem w/ IDENT authentication