Re: [ADMIN] invalid multibyte character for locale - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [ADMIN] invalid multibyte character for locale
Date
Msg-id 25979.1109267040@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Some download statistics
Next
From: Greg Stark
Date:
Subject: Re: [pgsql-hackers-win32] win32 performance - fsync question