Re: Re: Latin2 and Unicode problems

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: mucher(at)tigana(dot)pl
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: Latin2 and Unicode problems
Date: 2001-04-20 07:05:02
Message-ID: 20010420160502S.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Mucha 2001-04-20 07:56:34 Re: Re: Latin2 and Unicode problems
Previous Message Willis, Ian (Ento, Canberra) 2001-04-20 06:31:38 RE: Best practice