Re: to --enable-locale or not to --enable-locale? - Mailing list pgsql-admin

From Niclas Gustafsson
Subject Re: to --enable-locale or not to --enable-locale?
Date
Msg-id 001a01c1d3ee$42345e50$b700a8c0@gmg
Whole thread Raw
In response to Re: to --enable-locale or not to --enable-locale?  (Jean-Michel POURE <jm.poure@freesurf.fr>)
Responses Re: to --enable-locale or not to --enable-locale?
List pgsql-admin
Hi, I'm having trouble sorting my data.

I'm using PostgresQL 7.2 compiled with:
--enable-multibyte=LATIN1 --enable-locale

I've also created a test db, with one table:
CREATE DATABASE "testdb" WITH ENCODING = 'LATIN1';
And
CREATE TABLE "sorttest" (
  "id" int8 NOT NULL,
  "data" varchar(100),
  CONSTRAINT "sorttest_pkey" PRIMARY KEY ("id")
) WITH OIDS;

Then I've inserted some test values which seem to be sorted wrongfully
when I issue an
select * from sorttest order by data

This is the output I get:

aa
aå
aä
åa
äa
ab
åb
äb
aö
ba
bå
bä
bb
bö
za
zö

I want it sorted in abcd..zåäö
What am I missing here? Any Ideas?


Regards,

Niclas Gustafsson


-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Jean-Michel POURE
Sent: den 17 mars 2002 11:15
To: Peter Eisentraut; Morten Sickel
Cc: Pgsql-Admin (E-post)
Subject: Re: [ADMIN] to --enable-locale or not to --enable-locale?


Le Vendredi 15 Mars 2002 17:19, Peter Eisentraut a écrit :
> --enable-recode is a simplified version of part (2) of multibyte,
which
> only works for single-byte encodings.  It's mostly useful for
environments
> where Unix and Windows use different character sets for the same
language.
> (I think Czech was an example.)

As of PostgreSQL 7.2+, --enable--recode provides:
- Unicode <-> Latin1/Latin15 recoding,
- Unicode <-> SJIS (=Japanese Multibyte),
- and much more...

Client and server encodings can be set separately. Examples:
- CREATE DABASE foo WITH ENCODING 'Unicode';
- SET CLIENT_ENCODING = 'Latin9' (=ISO-8859-15) = Latin1 + euro symbol.

In pgAdmin2, we plan to take advantage of these new features to :
- change client encoding on the fly,
- display multi-byte text.

Cheers,
Jean-Michel POURE

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



pgsql-admin by date:

Previous
From: Ferdinand Smit
Date:
Subject: Re: slow inserts
Next
From: Oliver Elphick
Date:
Subject: Re: to --enable-locale or not to --enable-locale?