From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bjoern Metzdorf <bm@turtle-entertainment.de>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [ADMIN] invalid multibyte character for locale
Date: Thu, 24 Feb 2005 12:44:00 -0500
Message-ID: <25979.1109267040@sss.pgh.pa.us> (raw)
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>
Bjoern Metzdorf <bm@turtle-entertainment.de> writes:
> 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.
Perhaps it would be reasonable to do something like this:
#ifdef USE_WIDE_UPPER_LOWER
/*
* use wide char code only when max encoding length > one
* and we aren't in C locale
*/
if (pg_database_encoding_max_length() > 1 &&
!lc_ctype_is_c())
{
where lc_ctype_is_c() is the obvious clone of the existing
lc_collate_is_c() routine. We can reasonably assume that mbstowcs
is going to be unable to offer any useful behavior in C locale.
Comments?
regards, tom lane
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: tgl@sss.pgh.pa.us, bm@turtle-entertainment.de, pgsql-hackers@postgreSQL.org
Subject: Re: [ADMIN] invalid multibyte character for locale
In-Reply-To: <25979.1109267040@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> <421E0D6B.6010303@turtle-entertainment.de> <25979.1109267040@sss.pgh.pa.us>
* 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