Re: Unicode + LC_COLLATE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unicode + LC_COLLATE
Дата
Msg-id 25605.1082640664@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Unicode + LC_COLLATE  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
Ответы Re: Unicode + LC_COLLATE  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
Список pgsql-general
"John Sidney-Woollett" <johnsw@wardbrook.com> writes:
> Does anyone know what the effect of --lc-collate=C --encoding=UNICODE will
> be for sorts (and indexes?) when a multibyte unicode character is
> encountered?

C locale basically means "sort by the byte sequence values".  It'll do
something self-consistent, but maybe not what you'd like for UTF8
characters.

> Our database is UNICODE with LC_COLLATE=en_US.iso885915.

Does that sort rationally at all?  I should think you'd need to specify
an LC_COLLATE setting that's designed for UTF8 encoding, not 8859-15.

If you only ever store characters that are in 7-bit ASCII then none of
this will affect you, and you can get away with broken combinations of
encoding and locale.  But if you'd like to sort characters outside the
minimal ASCII set then you need to get it right ...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: [ADMIN] Restoring a Databases that features tserach2
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Unicode + LC_COLLATE