X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5360E9FA5E1 for ; Fri, 2 Jun 2006 04:57:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 37908-09 for ; Fri, 2 Jun 2006 04:56:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 35D759FA111 for ; Fri, 2 Jun 2006 04:56:55 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (T8fb8.t.pppool.de [89.55.143.184]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 45EC66583A; Fri, 2 Jun 2006 09:58:18 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 92B3F181C1BF5; Fri, 2 Jun 2006 09:57:08 +0200 (CEST) Message-ID: <447FEF54.8030702@logix-tt.com> Date: Fri, 02 Jun 2006 09:57:08 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.2 (X11/20060516) MIME-Version: 1.0 To: Bakos Sandor Cc: pgsql-jdbc@postgresql.org Subject: Re: UTF8 References: <447FECE3.1060508@freemail.hu> In-Reply-To: <447FECE3.1060508@freemail.hu> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/4 X-Sequence-Number: 15284 Hi, Bakos, Bakos Sandor wrote: > I get the following exception when I read a simple TXT file in Linux and > try to INSERT to the psql. (8.1.4) > > org.postgresql.util.PSQLException: ERROR: character 0xefbfbd of encoding > "UTF8" has no equivalent in "LATIN2" This meas that your database is encoded in ISO-LATIN2 charset, and psql is telling the server the data it sends is UTF-8. The server tries to convert the UTF-8 Data into LATIN2, but there is a character (whose UTF8-Sequence is 0xefbfbd) that is not contained in LATIN-2. Either your file is latin-2 in reality (or even another charset), then you should tell psql to use the latin-2 encoding. Or your file really is utf-8, and really contains characters not contained in latin-2. Then you have two possibilities: Edit the file and replace those characters with some transcription, or convert your database to utf-8 encoding (needs a dump&restore). HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org