Re: Re: création de base en UTF8

From: Cédric Villemain <cedric(dot)villemain(at)dalibo(dot)com>
To: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
Cc: jl(at)machinchose(dot)com, pgsql-fr-generale(at)postgresql(dot)org
Subject: Re: Re: création de base en UTF8
Date: 2007-10-29 16:35:32
Message-ID: 47260BD4.4020107@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale

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
>

In response to

Responses

Browse pgsql-fr-generale by date

  From Date Subject
Next Message Stephane Bortzmeyer 2007-10-29 16:41:15 Re: création de base en UTF8
Previous Message Stephane Bortzmeyer 2007-10-29 15:37:47 Re: création de base en UTF8