Re: Re: Latin2 and Unicode problems - Mailing list pgsql-general

From Tatsuo Ishii
Subject Re: Re: Latin2 and Unicode problems
Date
Msg-id 20010420160502S.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: Latin2 and Unicode problems  (Grzegorz Mucha <mucher@tigana.pl>)
Responses Re: Re: Latin2 and Unicode problems
List 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 by date:

Previous
From: "Willis, Ian (Ento, Canberra)"
Date:
Subject: RE: Best practice
Next
From: Diana Cionoiu
Date:
Subject: Re: client ssl