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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] 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
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster