pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bjoern Metzdorf <bm@turtle-entertainment.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pgsql-Admin (E-mail) <pgsql-admin@postgresql.org>
Subject: Re: invalid multibyte character for locale
Date: Thu, 24 Feb 2005 18:22:51 +0100
Message-ID: <421E0D6B.6010303@turtle-entertainment.de> (raw)
In-Reply-To: <24832.1109258150@sss.pgh.pa.us>
References: <421CF15C.6010306@turtle-entertainment.de>
	<421CF1CE.3000800@turtle-entertainment.de>
	<23514.1109203127@sss.pgh.pa.us>
	<421D8541.2000904@turtle-entertainment.de>
	<24832.1109258150@sss.pgh.pa.us>

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






view thread (11+ messages)  latest in thread

Message-ID: <421E0D6B.6010303@turtle-entertainment.de>
Permalink:  ../421E0D6B.6010303@turtle-entertainment.de/
Also on:    postgresql.org/message-id/421E0D6B.6010303@turtle-entertainment.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bm@turtle-entertainment.de, tgl@sss.pgh.pa.us
  Subject: Re: invalid multibyte character for locale
  In-Reply-To: <421E0D6B.6010303@turtle-entertainment.de>
  References: <421CF15C.6010306@turtle-entertainment.de> <421CF1CE.3000800@turtle-entertainment.de> <23514.1109203127@sss.pgh.pa.us> <421D8541.2000904@turtle-entertainment.de> <24832.1109258150@sss.pgh.pa.us> <421E0D6B.6010303@turtle-entertainment.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox