pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedQuestion about encoding
2+ messages / 2 participants
[nested] [flat]
* Question about encoding
@ 2004-06-14 18:32 André Gomes <andre@dsc.ufcg.edu.br>
2004-06-21 00:16 ` Re: Question about encoding Oliver Jowett <oliver@opencloud.com>
0 siblings, 1 reply; 2+ messages in thread
From: André Gomes @ 2004-06-14 18:32 UTC (permalink / raw)
To: pgsql-jdbc
Hi. How are you all ?
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 ?
thak you
[]'s
André Gomes
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Question about encoding
2004-06-14 18:32 Question about encoding André Gomes <andre@dsc.ufcg.edu.br>
@ 2004-06-21 00:16 ` Oliver Jowett <oliver@opencloud.com>
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Jowett @ 2004-06-21 00:16 UTC (permalink / raw)
To: André Gomes <andre@dsc.ufcg.edu.br>; +Cc: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-06-21 00:16 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-14 18:32 Question about encoding André Gomes <andre@dsc.ufcg.edu.br>
2004-06-21 00:16 ` Oliver Jowett <oliver@opencloud.com>
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