Re: PostgreSQL, UTF-8 and Mac OS X

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: PostgreSQL, UTF-8 and Mac OS X
Дата
Msg-id 20051107154204.GE841@svana.org
обсуждение исходный текст
Ответ на Re: PostgreSQL, UTF-8 and Mac OS X  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Nov 07, 2005 at 09:47:21AM -0500, Tom Lane wrote:
> Guido Neitzer <guido.neitzer@pharmaline.de> writes:
> > I have linked the LC_COLLATE for de_DE.UTF-8 to the same LC_COLLATE
> > file that works fine with ISO8859-1.
>
> Um ... why would you expect that to work at all?  Aren't the collation
> files very dependent on the encoding?

You'd think so, but standard Mac OS X/FreeBSD just link the UTF-8
locales to the US-ASCII locales. So by default:

de_DE.UTF-8  links to  ln_LN.US_ASCII

All he's done is change it so the UTF-8 locale uses latin9 rather than
ascii ordering. It obviously breaks for actual UTF-8 strings, but the C
library doesn't support that anyway... Multibyte collation simply
isn't supported so linking files at random won't crash anything.

All the more reason to go for something like ICU...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Aggregates, group, and order by
Следующее
От: juleni@livetrade.cz
Дата:
Сообщение: PROBLEM: Function does not exist