From: Oliver Jowett <oliver@opencloud.com>
To: André Gomes <andre@dsc.ufcg.edu.br>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Question about encoding
Date: Mon, 21 Jun 2004 12:16:50 +1200
Message-ID: <40D628F2.7070601@opencloud.com> (raw)
In-Reply-To: <000801c4523d$fceeaf00$b34ba596@munguza>
References: <000801c4523d$fceeaf00$b34ba596@munguza>
André Gomes wrote:
> I'm trying to insert some text with chars like 'ã', 'õ'. I'm using a
> postgres database with the LATIN10 encoding, but when I try to make a
> INSERT statement via JDBC these chars aren't insert into the database,
> they are replaced by '?'. Could you help me with this question. Is this
> a problem with the JDBC driver ? or with the database itself ?
What server and driver version are you using? Are the characters in
question directly in the query string or set as a parameter via
PreparedStatement.setString()?
There is no equivalent Java encoding for LATIN10, according to a comment
in the driver (is this still true?). If you are using a pre-7.3 server,
the encoding from Java strings to the database encoding happens on the
driver side, so in this case the driver can't find a suitable encoding
to use and just uses the JVM's default encoding, which is probably wrong.
-O
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: oliver@opencloud.com, andre@dsc.ufcg.edu.br
Subject: Re: Question about encoding
In-Reply-To: <40D628F2.7070601@opencloud.com>
References: <000801c4523d$fceeaf00$b34ba596@munguza> <40D628F2.7070601@opencloud.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