pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: smota <samuelmota@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Charset problem on WHERE clause
Date: Mon, 26 Jul 2004 11:20:40 -0300
Message-ID: <a8bb739d04072607204610c2ce@mail.gmail.com> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <a8bb739d04072607204610c2ce@mail.gmail.com>
Permalink:  ../a8bb739d04072607204610c2ce@mail.gmail.com/
Also on:    postgresql.org/message-id/a8bb739d04072607204610c2ce@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: samuelmota@gmail.com
  Subject: Re: Charset problem on WHERE clause
  In-Reply-To: <a8bb739d04072607204610c2ce@mail.gmail.com>
  References: <a8bb739d04072607204610c2ce@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox