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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Charset problem on WHERE clause



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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group