Re: Re: Latin2 and Unicode problems

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Re: Latin2 and Unicode problems
Дата
Msg-id 20010420160502S.t-ishii@sra.co.jp
обсуждение исходный текст
Ответ на Re: Latin2 and Unicode problems  (Grzegorz Mucha <mucher@tigana.pl>)
Ответы Re: Re: Latin2 and Unicode problems  (Grzegorz Mucha <mucher@tigana.pl>)
Список pgsql-general
> Well, I didn't state it correctly, then. When I use iso8859-2, Postgres is
> compiled with --enable-locale only (though compiling it with UNICODE
> support, then creating database with ISO encoding works fine - sorting,
> upper/lower case conversion).

I'm confused. Did you enable the locale support only?

Then, why you see following erros:

> However, when creating db with Unicode,  no matter if I try to use
> ISO8859-2 or Unicode client encoding, the db doesn't get it right - such
> functions as upper/lower etc. give unpredictable results (as the result
>  of select upper('some-polish-chars') return even some three-byte unicode
> chars). I quite frequently get the following message:
>
> utf_to_latin: could not convert UTF-8 (0xc3a3) ignored
> (the Unicode char code varies...)

This kind of error messages should appear only when the unicode
support enabled. So I assume both locale support AND unicode support
are enabled...

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?
--
Tatsuo Ishii

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

Предыдущее
От: "Willis, Ian (Ento, Canberra)"
Дата:
Сообщение: RE: Best practice
Следующее
От: Diana Cionoiu
Дата:
Сообщение: Re: client ssl