Re: UTF8

Поиск
Список
Период
Сортировка
От Marc Herbert
Тема Re: UTF8
Дата
Msg-id khjfyinj4h0.fsf@meije.emic.fr
обсуждение исходный текст
Ответ на UTF8  (Bakos Sandor <dr_saca@freemail.hu>)
Ответы Re: UTF8
Список pgsql-jdbc
Oliver Jowett <oliver@opencloud.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"

 http://www.fileformat.info/info/unicode/char/fffd/index.htm

Try printing this file from Java for debugguing.



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: CachedRowSet insertion problem with serial PK
Следующее
От: Bakos Sandor
Дата:
Сообщение: Re: UTF8