Skip site navigation (1) Skip section navigation (2)

Re: UTF8

From: Marc Herbert <Marc(dot)Herbert(at)continuent(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: UTF8
Date: 2006-06-02 09:23:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Oliver Jowett <oliver(at)opencloud(dot)com> writes:

> Markus Schaber wrote:
>> 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"

> I would guess that the problem is probably that when *reading* the
> text file originally, the wrong encoding is being used to convert the
> bytes to Java Strings. If you don't use the right encoding here, then
> the Java String you end up with will be garbage.

Very likely since 0xefbfbd is the... unicode "replacement character"

Try printing this file from Java for debugguing.

In response to

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


  • Re: UTF8 at 2006-06-02 17:27:42 from Bakos Sandor

pgsql-jdbc by date

Next:From: Markus SchaberDate: 2006-06-02 10:05:42
Subject: Re: UTF8
Previous:From: Markus SchaberDate: 2006-06-02 09:09:42
Subject: Re: UTF8

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group