Re: Pb with the French accentuated characters - Mailing list pgsql-php

From Jean-Michel POURE
Subject Re: Pb with the French accentuated characters
Date
Msg-id 200204301522.44037.jm.poure@freesurf.fr
Whole thread Raw
In response to Pb with the French accentuated characters  (frederic massot <frederic@juliana-multimedia.com>)
List pgsql-php
Le Mardi 30 Avril 2002 14:51, frederic massot a écrit :
> 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 ("é", "è", "à", 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=> insert into essai values ('était');
> ERROR:  Invalid UNICODE character sequence found (0xe97461)
> juliana=> insert into essai values ('ètait');
> ERROR:  Invalid UNICODE character sequence found (0xe87461)
> juliana=> insert into essai values ('àtait');
> ERROR:  Invalid UNICODE character sequence found (0xe07461)

Enter:
SET CLIENT_ENCODING = 'Latin9'

This will recode backend<->client stream from Unicode to Latin + Euro
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
database (UTF8), recode the file using :

recode ..u8 filename.sql

Cheers,
Jean-Michel POURE


pgsql-php by date:

Previous
From: frederic massot
Date:
Subject: Pb with the French accentuated characters
Next
From: frederic massot
Date:
Subject: Re: Pb with the French accentuated characters