Re: UTF8

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Bakos Sandor <dr_saca(at)freemail(dot)hu>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: UTF8
Date: 2006-06-02 07:57:08
Message-ID: 447FEF54.8030702@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

  • UTF8 at 2006-06-02 07:46:43 from Bakos Sandor

Responses

  • Re: UTF8 at 2006-06-02 08:19:08 from Oliver Jowett

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2006-06-02 08:19:08 Re: UTF8
Previous Message Bakos Sandor 2006-06-02 07:46:43 UTF8