Skip site navigation (1) Skip section navigation (2)

Re: invalid multibyte character for locale

From: Bjoern Metzdorf <bm(at)turtle-entertainment(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Pgsql-Admin (E-mail)" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: invalid multibyte character for locale
Date: 2005-02-24 17:22:51
Message-ID: 421E0D6B.6010303@turtle-entertainment.de (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-hackerspgsql-patches
Tom Lane wrote:
> I don't know what behavior you thought you were getting from upper/lower
> on UTF-8 data in 7.4, but it was surely not correct.  If you want to
> duplicate that misbehavior, try SQL_ASCII with C locale.  This does not
> stop you from storing UTF-8 in your database, mind you --- it just
> loses validation of encoding sequences and conversion to other schemes.

> But having said that, upper() should work if the locale matches the
> encoding.  You might take the trouble to trace down exactly what data
> value it's barfing on.

I want to keep UNICODE encoding in any case.

So you say, that 7.x just did not cope at all with multibyte chars and 
upper() and lower() spit out what the C functions toupper and tolower 
spit out?

I also want to stay with locale C, because of the speed. I have 
different languages, not only one specific, so changing the locale would 
not help at all.

I assume I could just remove

#define USE_WIDE_UPPER_LOWER

from oracle_compat.c to emulate the old behaviour. But a cleaner fix 
would be to check if we are using UNICODE and locale is C or POSIX and 
only then skip USE_WIDE_UPPER_LOWER.

Comments?

Regards,
Bjoern




In response to

Responses

pgsql-hackers by date

Next:From: Marc G. FournierDate: 2005-02-24 17:28:16
Subject: Re: [HACKERS] Some download statistics
Previous:From: Magnus HaganderDate: 2005-02-24 16:35:57
Subject: Some download statistics

pgsql-admin by date

Next:From: Goulet, DickDate: 2005-02-24 17:36:20
Subject: Re: Preventing changes to default settings of a collective account?
Previous:From: Joel FradkinDate: 2005-02-24 16:10:41
Subject: Re: invalid multibyte character for locale

pgsql-patches by date

Next:From: Tom LaneDate: 2005-02-24 17:44:00
Subject: Re: [ADMIN] invalid multibyte character for locale
Previous:From: Joel FradkinDate: 2005-02-24 16:10:41
Subject: Re: invalid multibyte character for locale

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group