From: | Guillaume Cottenceau <gc(at)mnc(dot)ch> |
---|---|
To: | "David Gagnon" <dgagnon74(at)hotmail(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: JDBC and Latin1 Database problem |
Date: | 2005-01-05 08:48:33 |
Message-ID: | 87vfacntwe.fsf@meuh.mnc.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
"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(at)meuh /tmp] perl -e 'print pack("H*", "00EF")' > 0x00ef
[gc(at)meuh /tmp] hexdump -C 0x00ef
00000000 00 ef |..|
00000002
[gc(at)meuh /tmp] iconv -f utf8 -t latin1 0x00ef
iconv: incomplete character or shift sequence at end of buffer
--
Guillaume Cottenceau
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolai Tufar | 2005-01-05 12:07:32 | Update: jdbc-tr.po |
Previous Message | madhavi pasumarthy | 2005-01-05 06:54:58 | unsubscribe |