Re: 'order by' does "wrong" with unicode-chars (german umlauts)

From: Kathy Zhu <Kathy(dot)Zhu(at)Sun(dot)COM>
To: pgsql-general(at)postgresql(dot)org, news3(at)winopticc(dot)dk
Subject: Re: 'order by' does "wrong" with unicode-chars (german umlauts)
Date: 2003-09-22 15:13:39
Message-ID: 200309221513.h8MFDgc14007@amon.Central.Sun.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think it is an expected result.
As far as I understand it, LC_ALL determines the collation/sorting rule, and
unicode allows you to store and retrieve multibytes character which has nothing
to do with the soring rules.

kathy

> X-Original-To: pgsql-general-postgresql(dot)org(at)localhost(dot)postgresql(dot)org
> Date: Sat, 20 Sep 2003 22:53:54 +0200
> From: Andreas Hinz <news3(at)winopticc(dot)dk>
> To: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] 'order by' does "wrong" with unicode-chars (german
umlauts)
> X-Virus-Scanned: by amavisd-new at postgresql.org
> X-Mailing-List: pgsql-general
> X-AntiAbuse: This header was added to track abuse, please include it with any
abuse report
> X-AntiAbuse: Primary Hostname - noon.pghoster.com
> X-AntiAbuse: Original Domain - sun.com
> X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
> X-AntiAbuse: Sender Address Domain - postgresql.org
> Content-Transfer-Encoding: 8bit
> X-MIME-Autoconverted: from quoted-printable to 8bit by amon.Central.Sun.COM id
h8M2O1c23732
>
> Sat, 20 Sep 2003 18:39:35 +0200
> skrev pilsl(at)goldfisch(dot)at (peter pilsl):
>
> > It makes no difference if I use a database with encoding unicode:
> >
>
> ah(at)ahb:~$ LC_ALL=da_DK initdb
> ah(at)ahb:~$ su postgres -c "/usr/local/pgsql/bin/createuser -ad ah"
> ah(at)ahb:~$ createdb ah
> ah(at)ahb:~$ psql ah
>
> ah=# \l
>
> List of databases
> Name | Owner | Encoding
> -----------+----------+-----------
> ah | ah | SQL_ASCII
>
>
> ah=# show client_encoding;
>
> client_encoding
> -----------------
> SQL_ASCII
> (1 row)
>
>
> CREATE TABLE test (f1 varchar);
>
> INSERT INTO test VALUES ('A');
> INSERT INTO test VALUES ('B');
> INSERT INTO test VALUES ('AA');
> INSERT INTO test VALUES ('Æ');
> INSERT INTO test VALUES ('Å');
> INSERT INTO test VALUES ('Ø');
> INSERT INTO test VALUES ('Ä');
> INSERT INTO test VALUES ('Ö');
> INSERT INTO test VALUES ('Ü');
>
> SELECT * FROM test ORDER BY f1;
>
> t
> ----
> A
> B
> Ü
> Æ
> Ä
> Ø
> Ö
> Å
> AA
> (9 rows)
>
>
> Looks OK to me ;-)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

Browse pgsql-general by date

  From Date Subject
Next Message E R 2003-09-22 15:43:34 Re: Can't Build 7.3.4 on OS X
Previous Message Molly Gibson 2003-09-22 15:01:10 mod_auth_pgsql & encryption