X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4CBD43A3C42 for ; Wed, 5 Jan 2005 08:49:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13380-07 for ; Wed, 5 Jan 2005 08:48:43 +0000 (GMT) Received: from mnc.ch (unknown [212.23.250.43]) by svr1.postgresql.org (Postfix) with ESMTP id D68623A3DE2 for ; Wed, 5 Jan 2005 08:48:39 +0000 (GMT) Received: (qmail 5202 invoked from network); 5 Jan 2005 09:48:37 +0100 Received: from 62-2-77-204.business.cablecom.ch (HELO meuh.mnc.ch) (62.2.77.204) by www.mnc.ch.com with SMTP; 5 Jan 2005 09:48:37 +0100 Received: by meuh.mnc.ch (Postfix, from userid 1000) id E577723EEC1; Wed, 5 Jan 2005 09:48:33 +0100 (CET) To: "David Gagnon" Cc: pgsql-jdbc@postgresql.org Subject: Re: JDBC and Latin1 Database problem References: From: Guillaume Cottenceau Date: 05 Jan 2005 09:48:33 +0100 In-Reply-To: Message-ID: <87vfacntwe.fsf@meuh.mnc.ch> Lines: 26 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.058 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/17 X-Sequence-Number: 11897 "David Gagnon" 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