Re: Re: création de bas e en UTF8
Stephane Bortzmeyer a écrit :
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
habituellement fr_FR.iso-8859-15 sur debian
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 »
export LANG=fr_FR.UTF8
ca va changer vos locales pour la console courante. (donc psql aura de
l'utf8 et sera heureux)
À 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)
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
Home |
Main Index |
Thread Index