Re: JDBC and Latin1 Database problem
От | Guillaume Cottenceau |
---|---|
Тема | Re: JDBC and Latin1 Database problem |
Дата | |
Msg-id | 87vfacntwe.fsf@meuh.mnc.ch обсуждение исходный текст |
Ответ на | JDBC and Latin1 Database problem ("David Gagnon" <dgagnon74@hotmail.com>) |
Список | 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@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
В списке pgsql-jdbc по дате отправления: