Re: Re: Latin2 and Unicode problems

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Re: Latin2 and Unicode problems
Дата
Msg-id 20010422165425V.t-ishii@sra.co.jp
обсуждение исходный текст
Ответ на Re: Re: Latin2 and Unicode problems  (Grzegorz Mucha <mucher@tigana.pl>)
Список pgsql-general
> Sorry then. Well, I tested two cases:
> - pg compiled only with enable locale and iso8859-2 works
> - pg compiled with locale, enable unicode and unicode conversion doesn't
> work as it should.
>
> > That's because locale support (--enable-locale) does not consider
> > about the Unicode support. (that's not the locale support's fault,
> > since it was developped before the Unicode support appears). When you
> > create the unicode database, everything is represented in the UTF-8
> > encoding. However, the locale support thinks that it is ISO 8859-2 (in
> > your case) and it try to do the case conversion using the ISO 8859-2
> > locale. As a result, you see invalid UTF-8 sequences.
> >
> > Does it match your situation?
>
> Actually, that may be it. I stopped getting the messages after compiling
> without locale support, but with Unicode. But there is still the problem
> of not working sorting and conversions. Only option I can think of would
> be to somehow set the system locale to pl_PL.UTF-8 (I don't even know if
> there's such option). Please let me know if there is another way to do it.

I understand your problem. Another way I could think of is modifying
PostgreSQL backend so that it converts UTF-8 to 88569-2 before calling
strcoll(), toupper() or tolower(). This might be terribly slow,
though.

BTW, if you use only ISO 8859-2, then why you need to store data as
UTF-8 in the database?
--
Tatsuo Ishii

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

Предыдущее
От: "August Zajonc"
Дата:
Сообщение: Re: Sourceforge PG crash
Следующее
От: Louis-David Mitterrand
Дата:
Сообщение: Re: Trusted plperl