Re: Pb with the French accentuated characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux