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-22 07:54:25
Message-ID: 20010422165425V.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Louis-David Mitterrand 2001-04-22 08:20:04 Re: Trusted plperl
Previous Message August Zajonc 2001-04-22 05:29:55 Re: Sourceforge PG crash