Re: ORDER BY and Unicode

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: ORDER BY and Unicode
Дата
Msg-id 20040512064519.A73325@megazone.bigpanda.com
обсуждение исходный текст
Ответ на ORDER BY and Unicode  ("M. Bastin" <marcbastin@mindspring.com>)
Ответы Re: ORDER BY and Unicode  ("M. Bastin" <marcbastin@mindspring.com>)
Re: ORDER BY and Unicode  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "M. Bastin"
Дата:
Сообщение: ORDER BY and Unicode
Следующее
От: Ian Pilcher
Дата:
Сообщение: Re: Darn pop singers!