Re: créatio n de base en UTF8
- From: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
- To: jl(at)machinchose(dot)com
- Cc: pgsql-fr-generale(at)postgresql(dot)org
- Subject: Re: créatio n de base en UTF8
- Date: Mon, 29 Oct 2007 16:37:47 +0100
- Message-id: <20071029153747(dot)GA31700(at)nic(dot)fr>
On Mon, Oct 29, 2007 at 03:16:57PM +0100,
jl(at)machinchose(dot)com <jl(at)machinchose(dot)com> wrote
a message of 23 lines which said:
> Je suis sur un système Debian-Lenny dont les locales sont en
> fr_FR(at)euro(dot)
Quel est l'encodage de cette locale ? Rien dans son nom ne l'indique.
% grep fr_FR /etc/locale.gen
> Elle apparait bien quand on lance la commande 'psql -l'. Mais elle
> est inutilisable car j'obtients l'erreur suivante des que je fais une
> interrogation :
>
> Séquence d'octets invalide pour le codage « UTF8 »
À 95 %, votre terminal n'est pas UTF-8 et envoie donc de mauvaise
données à PostgreSQL.
Essai depuis un terminal ISO-8859-1 :
ma_base=> INSERT INTO bof (content) VALUES ('Café');
ERROR: invalid byte sequence for encoding "UTF8": 0xe92729
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
ma_base=> SET client_encoding TO 'latin-1';
SET
ma_base=> INSERT INTO bof (content) VALUES ('Café');
INSERT 0 1
ma_base=> SELECT * FROM bof;
id | content
----+---------
1 | Café
(1 row)
Home |
Main Index |
Thread Index