From: Guillaume Cottenceau <gc@mnc.ch>
To: David Gagnon <dgagnon74@hotmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC and Latin1 Database problem
Date: 05 Jan 2005 09:48:33 +0100
Message-ID: <87vfacntwe.fsf@meuh.mnc.ch> (raw)
In-Reply-To: <BAY17-F4793E7DA8B91F1D406AE3A6920@phx.gbl>
References: <BAY17-F4793E7DA8B91F1D406AE3A6920@phx.gbl>
"David Gagnon" <dgagnon74 'at' hotmail.com> writes:
> ERROR [main] (Dao.java:267) 2005-01-04 20:40:10,044 : Error
> processing the sql file: resources/auxilary/payment/insert_test.sql
> org.postgresql.util.PSQLException: ERROR: could not convert UTF-8
> character 0x00ef to ISO8859-1
I think there is a problem in the data you're trying to send to
the database. Don't forget that Java strings have no "charset"
(actually they are internally using unicode) so there is some
care when reading data from files into java strings, in order to
be sure that the correct charset (the one in which the data in
files is encoded) was specified.
The character sequence for sure doesn't look like a valid UTF8
one, as the problem can be duplicated with iconv:
[gc@meuh /tmp] perl -e 'print pack("H*", "00EF")' > 0x00ef
[gc@meuh /tmp] hexdump -C 0x00ef
00000000 00 ef |..|
00000002
[gc@meuh /tmp] iconv -f utf8 -t latin1 0x00ef
iconv: incomplete character or shift sequence at end of buffer
--
Guillaume Cottenceau
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: gc@mnc.ch, dgagnon74@hotmail.com
Subject: Re: JDBC and Latin1 Database problem
In-Reply-To: <87vfacntwe.fsf@meuh.mnc.ch>
References: <BAY17-F4793E7DA8B91F1D406AE3A6920@phx.gbl> <87vfacntwe.fsf@meuh.mnc.ch>
* 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