Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 365CE4759BD for ; Tue, 30 Apr 2002 09:22:46 -0400 (EDT) Received: from www1.translationforge.com (unknown [212.11.36.58]) by postgresql.org (Postfix) with ESMTP id 9D1F44750F5 for ; Tue, 30 Apr 2002 09:22:43 -0400 (EDT) Received: from linus.translationforge.com ([192.168.1.102]) by www1.translationforge.com (8.12.1/8.12.1) with ESMTP id g3UDMjKO021497; Tue, 30 Apr 2002 15:22:45 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Jean-Michel POURE Reply-To: jm.poure@freesurf.fr To: frederic massot , pgsql-php@postgresql.org Subject: Re: Pb with the French accentuated characters Date: Tue, 30 Apr 2002 15:22:44 +0200 X-Mailer: KMail [version 1.4] References: <3CCE936B.245D870C@juliana-multimedia.com> In-Reply-To: <3CCE936B.245D870C@juliana-multimedia.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200204301522.44037.jm.poure@freesurf.fr> X-Archive-Number: 200204/103 X-Sequence-Number: 1127 Le Mardi 30 Avril 2002 14:51, frederic massot a =E9crit : > Since the update of a PC of test (Debian GNU/Linux Woody, Apache > 1.3.23-1, Php4 4.1.2, Postgresql 7.2.1), the Web sites functioning on > this PC produce errors during the insertion of French accentuated > characters ("=E9", "=E8", "=E0", etc...) in the databases. > An error message with PHP : > PostgreSQL query failed: ERROR: Invalid UNICODE character sequence > found (0xe97373) So I presume your database is Unicode. > Error messages with psql : > juliana=3D> insert into essai values ('=E9tait'); > ERROR: Invalid UNICODE character sequence found (0xe97461) > juliana=3D> insert into essai values ('=E8tait'); > ERROR: Invalid UNICODE character sequence found (0xe87461) > juliana=3D> insert into essai values ('=E0tait'); > ERROR: Invalid UNICODE character sequence found (0xe07461) Enter: SET CLIENT_ENCODING =3D 'Latin9' This will recode backend<->client stream from Unicode to Latin + Euro=20 encoding. If you don't need Euro support, you could also recode to Latin1. Otherwise, when importing text from a flat file (Latin) into a unicode=20 database (UTF8), recode the file using : recode ..u8 filename.sql Cheers, Jean-Michel POURE