From: | Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Jirí Pavlovský *EXTERN* <jiri(at)pavlovsky(dot)eu>, Alban Hertroys <haramrae(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: utf8 errors |
Date: | 2013-06-28 06:10:44 |
Message-ID: | 1372399844.2554.25.camel@asus-1001PX.home |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2013-06-28 06:15:33 | Re: utf8 errors |
Previous Message | sachin kotwal | 2013-06-28 04:30:53 | Re: Migration from DB2 to PostgreSQL-TIMESTAMP(arg1,arg1) |