Re: to --enable-locale or not to --enable-locale?

From: "Niclas Gustafsson" <niclas(dot)gustafsson(at)codesense(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: to --enable-locale or not to --enable-locale?
Date: 2002-03-25 11:14:38
Message-ID: 001a01c1d3ee$42345e50$b700a8c0@gmg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
ab
åb
äb

ba


bb

za

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

Regards,

Niclas Gustafsson

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Oliver Elphick 2002-03-25 11:25:48 Re: to --enable-locale or not to --enable-locale?
Previous Message Ferdinand Smit 2002-03-25 10:06:15 Re: slow inserts