Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: créatio n de base en UTF8



On Mon, Nov 05, 2007 at 10:25:19PM +0100,
 Daniel Verite <daniel(at)manitou-mail(dot)org> wrote 
 a message of 49 lines which said:

> Serveur 8.1 debian etch, initdb --locale=fr_FR.iso88591
...
> template0 | postgres     | LATIN1

Euh, mais n'est-ce pas ça, l'erreur ?
http://www.postgresql.org/docs/8.1/static/app-initdb.html dit bien
"For these reasons it is important to choose the right locale when
running initdb." Avec un initdb --encoding=UTF8 --locale=fr_FR.UTF8,
tout marche apparemment.

> Environnement client: fr_FR.iso88591

Et sur le serveur ? Car, chez moi, ce test marche sans problème
(Debian etch, PostgreSQL 8.1.9) mais j'ai, dans
/etc/postgresql/8.1/main/environment, LC_CTYPE=fr_FR.UTF8

Il me parait logique que la locale du serveur corresponde à l'encodage
utilisé pour les bases ; ce sont uniquement mes locales utilisateur,
client, qui sont en Latin1.

postgres=# \c u8
You are now connected to database "u8".
u8=# set client_encoding=latin1;
SET
u8=#  select lower('à');
 lower 
-------
 à
(1 row)

u8=#  select lower('À');
 lower 
-------
 à
(1 row)

u8=# 



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group