Re: utf8 errors

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Jirí Pavlovský <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:15:33
Message-ID: CAFj8pRCvNosKOC=iJHTF3ruCfQxv=LTEjyTRpnhoAqEfSJHg4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

2013/6/28 Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>:
> 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.

there is a same issues in perl dbi driver with UTF8 strings - it does
some artificial intelligence and try to do some utf transformations.

Pavel

>
> 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
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2013-06-28 06:16:57 Re: utf8 errors
Previous Message Vincent Veyron 2013-06-28 06:10:44 Re: utf8 errors