Re: utf8 errors

Поиск
Список
Период
Сортировка
От Vincent Veyron
Тема Re: utf8 errors
Дата
Msg-id 1372399844.2554.25.camel@asus-1001PX.home
обсуждение исходный текст
Ответ на Re: utf8 errors  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: utf8 errors  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: utf8 errors  (Vincent Veyron <vv.lists@wanadoo.fr>)
Re: utf8 errors  (Alban Hertroys <haramrae@gmail.com>)
Список pgsql-general
Hi,

FYI, I had the exact same problem earlier this week, while building a
new Debian Stable (Wheezy) server where postgresql version is 9.1.9-1
for a database containing accented characters.

Steps where :
pg_dump of a database encoded in LATIN9 on the old machine which uses
the fr_FR@euro locale
use iconv to convert the dump file to utf-8 on the new machine where
locale is fr_FR.UTF-8
edit dump file, change :
SET client_encoding = 'LATIN9';
to:
SET client_encoding = 'UTF-8';
recreate db on the new machine with the dump file

The database is used in a mod_perl application accessed via a navigator,
similar to the one in my sig. While accented characters coming from the
perl code were fine, all those out of the database would appear garbled
(like : @Å ) and update queries were impossible, generating the same
error message as the OP (ERROR:  invalid byte sequence for encoding
"UTF8": 0x9c)

When using ssh, I had to manually change my client encoding to UTF-8 (my
workstation uses LATIN9) for the data to appear correctly on the screen.

The machine had to go into production, so I finally gave up on UTF-8 and
used LATIN9 as the locale.

I tried reproducing the problem with 9.1 on a stock Debian Squeeze
machine using backports. On this machine, accented characters would
appear garbled, but update queries were possible.


--
Salutations, Vincent Veyron
http://marica.fr/
Gestion des contrats, des contentieux juridiques et des sinistres
d'assurance



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

Предыдущее
От: sachin kotwal
Дата:
Сообщение: Re: Migration from DB2 to PostgreSQL-TIMESTAMP(arg1,arg1)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: utf8 errors