pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Michel POURE <jm.poure@freesurf.fr>
To: frederic massot <frederic@juliana-multimedia.com>
To: pgsql-php@postgresql.org
Subject: Re: Pb with the French accentuated characters
Date: Tue, 30 Apr 2002 15:22:44 +0200
Message-ID: <200204301522.44037.jm.poure@freesurf.fr> (raw)
In-Reply-To: <3CCE936B.245D870C@juliana-multimedia.com>
References: <3CCE936B.245D870C@juliana-multimedia.com>

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




view thread (5+ messages)  latest in thread

Message-ID: <200204301522.44037.jm.poure@freesurf.fr>
Permalink:  ../200204301522.44037.jm.poure@freesurf.fr/
Also on:    postgresql.org/message-id/200204301522.44037.jm.poure@freesurf.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: jm.poure@freesurf.fr, frederic@juliana-multimedia.com
  Subject: Re: Pb with the French accentuated characters
  In-Reply-To: <200204301522.44037.jm.poure@freesurf.fr>
  References: <3CCE936B.245D870C@juliana-multimedia.com> <200204301522.44037.jm.poure@freesurf.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox