Re: Query failed: ERROR: character with byte sequence 0xc2 0x96 in encoding "UTF8" has no equivalent in encoding "WIN1250"

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Query failed: ERROR: character with byte sequence 0xc2 0x96 in encoding "UTF8" has no equivalent in encoding "WIN1250"
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B50FEB496@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на RE: [GENERAL] Query failed: ERROR: character with byte sequence 0xc2 0x96 in encoding "UTF8" has no equivalent in encoding "WIN1250"  (NTPT <NTPT@seznam.cz>)
Ответы Re: Query failed: ERROR: character with byte sequence 0xc2 0x96 in encoding "UTF8" has no equivalent in encoding "WIN1250"  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
I realize I was too short, sorry.

NTPT wrote:
> but how to update affected columns ? error message does not  provide single  clue ( at least row name)

For every table and every column in the source database that might be
affected, try something like:

SELECT id, col FROM tab WHERE col LIKE E'%\x96%';

Then issue UPDATE statements for the affected rows, e.g. replacing "–" with "-".

> And dump-restore ?  It  do not underestand how it could help.. dumped as unicode  restore as unicode =
> I am at the same point ... dumping as latin2 and restore to utf8 will end with the some errors..  I
> suspect

You can run something like this over the plain text dump:

sed -e 's/–/-/g' dump.sql >fixed.sql

Of course there might be other windows characters lurking ...

Yours,
Laurenz Albe

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

Предыдущее
От: George Neuner
Дата:
Сообщение: Re: using a postgres table as a multi-writer multi-updater queue
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: Query failed: ERROR: character with byte sequence 0xc2 0x96 in encoding "UTF8" has no equivalent in encoding "WIN1250"