Re: ORDER BY and Unicode - Mailing list pgsql-novice

From Stephan Szabo
Subject Re: ORDER BY and Unicode
Date
Msg-id 20040512064519.A73325@megazone.bigpanda.com
Whole thread Raw
In response to ORDER BY and Unicode  ("M. Bastin" <marcbastin@mindspring.com>)
Responses Re: ORDER BY and Unicode
Re: ORDER BY and Unicode
List pgsql-novice
On Wed, 12 May 2004, M. Bastin wrote:

> There seems to be a big problem with Unicode for
> which a solution might already exist.  Somebody
> had the following problem on another mailing
> list.  My suggestion is at the bottom of this
> message but if another solution already exists
> I'd like to hear about it.
>
> The problem is that special characters aren't
> treated right under Unicode.  Here are a few
> examples:
>
> 1.   "UPPER('�')" doesn't work.

IIRC, right now upper and lower only work correctly in
single byte encodings. I think when full sql collation
and character set behavior is done this problem will
go away.

> 2.  "ORDER BY mycolumn" gives a wrong sort order.
>
> Uppercase ASCII characters come first, then
> lowercase ASCII, then accented characters...
> This really isn't what a human would like to see.

This is driven by locale, what LC_COLLATE value
was the database created with (if you don't know then
pg_controldata should give that to you)?

It sounds like the locale is "C" locale which means
sort by byte value or perhaps the locale is one that isn't
for the correct encoding.

pgsql-novice by date:

Previous
From: "M. Bastin"
Date:
Subject: ORDER BY and Unicode
Next
From: Ian Pilcher
Date:
Subject: Re: Darn pop singers!