pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedinvalid multibyte character for locale
11+ messages / 5 participants
[nested] [flat]
* invalid multibyte character for locale
@ 2005-02-23 21:10 Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
0 siblings, 1 reply; 11+ messages in thread
From: Bjoern Metzdorf @ 2005-02-23 21:10 UTC (permalink / raw)
To: pgsql-admin
Hi,
I am testdriving postgresql 8.0.1.
On importing my old dump which works fine on 7.4.6 I am getting errors
like this one:
CREATE INDEX foobar_uvalue_key ON foobar USING btree (upper((value)::text));
ERROR: invalid multibyte character for locale
HINT: The server's LC_CTYPE locale is probably incompatible with the
database encoding.
pg_controldatas output (this is an EM64T machine (debian pure64), but
the issue also comes on 32bit Linux):
pg_control version number: 74
Catalog version number: 200411041
Database system identifier: 4763589314759867390
Database cluster state: in production
pg_control last modified: Wed Feb 23 22:07:43 2005
Current log file ID: 1
Next log file segment: 214
Latest checkpoint location: 1/D56163E8
Prior checkpoint location: 1/D56163A0
Latest checkpoint's REDO location: 1/D56163E8
Latest checkpoint's UNDO location: 0/0
Latest checkpoint's TimeLineID: 1
Latest checkpoint's NextXID: 3704
Latest checkpoint's NextOID: 50861184
Time of latest checkpoint: Wed Feb 23 21:40:25 2005
Database block size: 8192
Blocks per segment of large relation: 131072
Bytes per WAL segment: 16777216
Maximum length of identifiers: 64
Maximum number of function arguments: 32
Date/time type storage: floating-point numbers
Maximum length of locale name: 128
LC_COLLATE: C
LC_CTYPE: C
Should I be using de_DE or de_DE.UTF_8 locale? C locale always worked
fine for us (with 7.3 and 7.4).
Any hints?
Regards,
Bjoern
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
@ 2005-02-23 21:12 ` Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 11+ messages in thread
From: Bjoern Metzdorf @ 2005-02-23 21:12 UTC (permalink / raw)
To: pgsql-admin
I forgot to say that I am using UNICODE for database encoding (initdb -E
UNICODE and createdb -E UNICODE).
Bjoern Metzdorf wrote:
> Hi,
>
> I am testdriving postgresql 8.0.1.
>
> On importing my old dump which works fine on 7.4.6 I am getting errors
> like this one:
>
> CREATE INDEX foobar_uvalue_key ON foobar USING btree
> (upper((value)::text));
> ERROR: invalid multibyte character for locale
> HINT: The server's LC_CTYPE locale is probably incompatible with the
> database encoding.
>
> pg_controldatas output (this is an EM64T machine (debian pure64), but
> the issue also comes on 32bit Linux):
>
> pg_control version number: 74
> Catalog version number: 200411041
> Database system identifier: 4763589314759867390
> Database cluster state: in production
> pg_control last modified: Wed Feb 23 22:07:43 2005
> Current log file ID: 1
> Next log file segment: 214
> Latest checkpoint location: 1/D56163E8
> Prior checkpoint location: 1/D56163A0
> Latest checkpoint's REDO location: 1/D56163E8
> Latest checkpoint's UNDO location: 0/0
> Latest checkpoint's TimeLineID: 1
> Latest checkpoint's NextXID: 3704
> Latest checkpoint's NextOID: 50861184
> Time of latest checkpoint: Wed Feb 23 21:40:25 2005
> Database block size: 8192
> Blocks per segment of large relation: 131072
> Bytes per WAL segment: 16777216
> Maximum length of identifiers: 64
> Maximum number of function arguments: 32
> Date/time type storage: floating-point numbers
> Maximum length of locale name: 128
> LC_COLLATE: C
> LC_CTYPE: C
>
> Should I be using de_DE or de_DE.UTF_8 locale? C locale always worked
> fine for us (with 7.3 and 7.4).
>
> Any hints?
>
> Regards,
> Bjoern
>
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
@ 2005-02-23 23:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
0 siblings, 1 reply; 11+ messages in thread
From: Tom Lane @ 2005-02-23 23:58 UTC (permalink / raw)
To: Bjoern Metzdorf <bm@turtle-entertainment.de>; +Cc: pgsql-admin
Bjoern Metzdorf <bm@turtle-entertainment.de> writes:
> CREATE INDEX foobar_uvalue_key ON foobar USING btree
> (upper((value)::text));
> ERROR: invalid multibyte character for locale
> HINT: The server's LC_CTYPE locale is probably incompatible with the
> database encoding.
> I forgot to say that I am using UNICODE for database encoding (initdb -E
> UNICODE and createdb -E UNICODE).
Well, in that case your encoding is indeed at variance with your locale
setting ;-). Perhaps you should declare the encoding as SQL_ASCII.
The immediate problem is that mbstowcs() is being called and it
evidently doesn't know what to do in C locale. SQL_ASCII (or any
single-byte encoding) would bypass this code path and avoid the
error.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-02-24 07:41 ` Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 15:15 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 11+ messages in thread
From: Bjoern Metzdorf @ 2005-02-24 07:41 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Tom Lane wrote:
> Well, in that case your encoding is indeed at variance with your locale
> setting ;-). Perhaps you should declare the encoding as SQL_ASCII.
> The immediate problem is that mbstowcs() is being called and it
> evidently doesn't know what to do in C locale. SQL_ASCII (or any
> single-byte encoding) would bypass this code path and avoid the
> error.
The problem is that we need UNICODE encoding in our database. We make
heavy use of UTF-8 (our website is multilingual).
I now tried with locale set to de_DE.UTF-8, but
CREATE INDEX foobar_uvalue_key ON foobar USING btree (upper((value)::text));
still gives me
ERROR: invalid multibyte character for locale.
With 7.3 and 7.4 this is working fine. May I assume that 7.3 and 7.4
behaviour is buggy? Is 8.0 just stricter or is this just a side effect
of your fix for multibyte upper/lower problem for locale != C?
If 7.3 and 7.4 behaviour is intended, is there a way to let 8.0 behave
the same?
Regards,
Bjoern
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
@ 2005-02-24 15:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 16:10 ` Re: invalid multibyte character for locale Joel Fradkin <jfradkin@wazagua.com>
2005-02-24 17:22 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
0 siblings, 2 replies; 11+ messages in thread
From: Tom Lane @ 2005-02-24 15:15 UTC (permalink / raw)
To: Bjoern Metzdorf <bm@turtle-entertainment.de>; +Cc: pgsql-admin
Bjoern Metzdorf <bm@turtle-entertainment.de> writes:
> Is 8.0 just stricter or is this just a side effect
> of your fix for multibyte upper/lower problem for locale != C?
Both those statements are true.
> If 7.3 and 7.4 behaviour is intended, is there a way to let 8.0 behave
> the same?
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.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 15:15 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-02-24 16:10 ` Joel Fradkin <jfradkin@wazagua.com>
1 sibling, 0 replies; 11+ messages in thread
From: Joel Fradkin @ 2005-02-24 16:10 UTC (permalink / raw)
To: 'Tom Lane' <tgl@sss.pgh.pa.us>; 'Bjoern Metzdorf' <bm@turtle-entertainment.de>; +Cc: pgsql-admin
I ended up using SQL_ASCHII and could see lower works fine but on extended
chars it does nothing.
SO if that's what your shooting for it worked ok for me.
I would have preferred to have my encoding Unicode , but don't want to
figure out why the odbc driver was not able to insert extended chars.
I could insert the extended chars fine in pgadmin and also with .net driver
with a encoding = Unicode, but we have lots of asp that will use the odbc
driver so I had to go with SQL_ASCHII to avoid getting errors.
Joel Fradkin
Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel. 941-753-7111 ext 305
jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
This email message is for the use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and delete and destroy
all copies of the original message, including attachments.
-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Thursday, February 24, 2005 10:16 AM
To: Bjoern Metzdorf
Cc: Pgsql-Admin (E-mail)
Subject: Re: [ADMIN] invalid multibyte character for locale
Bjoern Metzdorf <bm@turtle-entertainment.de> writes:
> Is 8.0 just stricter or is this just a side effect
> of your fix for multibyte upper/lower problem for locale != C?
Both those statements are true.
> If 7.3 and 7.4 behaviour is intended, is there a way to let 8.0 behave
> the same?
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.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 15:15 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-02-24 17:22 ` Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 17:44 ` Re: [ADMIN] invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 11+ messages in thread
From: Bjoern Metzdorf @ 2005-02-24 17:22 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [ADMIN] invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 15:15 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 17:22 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
@ 2005-02-24 17:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-03-15 05:26 ` Re: [HACKERS] [ADMIN] invalid multibyte character for locale Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 11+ messages in thread
From: Tom Lane @ 2005-02-24 17:44 UTC (permalink / raw)
To: Bjoern Metzdorf <bm@turtle-entertainment.de>; +Cc: pgsql-hackers@postgreSQL.org
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
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [HACKERS] [ADMIN] invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 15:15 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 17:22 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 17:44 ` Re: [ADMIN] invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-03-15 05:26 ` Bruce Momjian <pgman@candle.pha.pa.us>
2005-03-15 05:52 ` Re: [HACKERS] [ADMIN] invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 11+ messages in thread
From: Bruce Momjian @ 2005-03-15 05:26 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bjoern Metzdorf <bm@turtle-entertainment.de>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Tom Lane wrote:
> 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.
Tom, is this the fix you were thinking of? Seems like it would be a
good improvement.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachments:
/pgpatches/mb (text/plain, 3.5K) download
Index: src/backend/utils/adt/oracle_compat.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/adt/oracle_compat.c,v
retrieving revision 1.57
diff -c -c -r1.57 oracle_compat.c
*** src/backend/utils/adt/oracle_compat.c 31 Dec 2004 22:01:22 -0000 1.57
--- src/backend/utils/adt/oracle_compat.c 15 Mar 2005 05:24:11 -0000
***************
*** 166,173 ****
lower(PG_FUNCTION_ARGS)
{
#ifdef USE_WIDE_UPPER_LOWER
! /* use wide char code only when max encoding length > one */
! if (pg_database_encoding_max_length() > 1)
{
text *string = PG_GETARG_TEXT_P(0);
text *result;
--- 166,173 ----
lower(PG_FUNCTION_ARGS)
{
#ifdef USE_WIDE_UPPER_LOWER
! /* use wide char code only when max encoding length > 1 */
! if (pg_database_encoding_max_length() > 1 && !lc_ctype_is_c())
{
text *string = PG_GETARG_TEXT_P(0);
text *result;
***************
*** 229,235 ****
{
#ifdef USE_WIDE_UPPER_LOWER
/* use wide char code only when max encoding length > one */
! if (pg_database_encoding_max_length() > 1)
{
text *string = PG_GETARG_TEXT_P(0);
text *result;
--- 229,235 ----
{
#ifdef USE_WIDE_UPPER_LOWER
/* use wide char code only when max encoding length > one */
! if (pg_database_encoding_max_length() > 1 && !lc_ctype_is_c())
{
text *string = PG_GETARG_TEXT_P(0);
text *result;
***************
*** 294,300 ****
{
#ifdef USE_WIDE_UPPER_LOWER
/* use wide char code only when max encoding length > one */
! if (pg_database_encoding_max_length() > 1)
{
text *string = PG_GETARG_TEXT_P(0);
text *result;
--- 294,300 ----
{
#ifdef USE_WIDE_UPPER_LOWER
/* use wide char code only when max encoding length > one */
! if (pg_database_encoding_max_length() > 1 && !lc_ctype_is_c())
{
text *string = PG_GETARG_TEXT_P(0);
text *result;
Index: src/backend/utils/adt/pg_locale.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/adt/pg_locale.c,v
retrieving revision 1.30
diff -c -c -r1.30 pg_locale.c
*** src/backend/utils/adt/pg_locale.c 1 Jan 2005 05:43:07 -0000 1.30
--- src/backend/utils/adt/pg_locale.c 15 Mar 2005 05:24:11 -0000
***************
*** 197,202 ****
--- 197,229 ----
/*
+ * We'd like to cache whether LC_CTYPE is C (or POSIX), so we can
+ * optimize a few code paths in various places.
+ */
+ bool
+ lc_ctype_is_c(void)
+ {
+ /* Cache result so we only have to compute it once */
+ static int result = -1;
+ char *localeptr;
+
+ if (result >= 0)
+ return (bool) result;
+ localeptr = setlocale(LC_CTYPE, NULL);
+ if (!localeptr)
+ elog(ERROR, "invalid LC_CTYPE setting");
+
+ if (strcmp(localeptr, "C") == 0)
+ result = true;
+ else if (strcmp(localeptr, "POSIX") == 0)
+ result = true;
+ else
+ result = false;
+ return (bool) result;
+ }
+
+
+ /*
* Frees the malloced content of a struct lconv. (But not the struct
* itself.)
*/
Index: src/include/utils/pg_locale.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/utils/pg_locale.h,v
retrieving revision 1.19
diff -c -c -r1.19 pg_locale.h
*** src/include/utils/pg_locale.h 1 Jan 2005 05:43:09 -0000 1.19
--- src/include/utils/pg_locale.h 15 Mar 2005 05:24:16 -0000
***************
*** 32,37 ****
--- 32,38 ----
bool doit, GucSource source);
extern bool lc_collate_is_c(void);
+ extern bool lc_ctype_is_c(void);
/*
* Return the POSIX lconv struct (contains number/money formatting
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [HACKERS] [ADMIN] invalid multibyte character for locale
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 15:15 ` Re: invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 17:22 ` Re: invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 17:44 ` Re: [ADMIN] invalid multibyte character for locale Tom Lane <tgl@sss.pgh.pa.us>
2005-03-15 05:26 ` Re: [HACKERS] [ADMIN] invalid multibyte character for locale Bruce Momjian <pgman@candle.pha.pa.us>
@ 2005-03-15 05:52 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 11+ messages in thread
From: Tom Lane @ 2005-03-15 05:52 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Bjoern Metzdorf <bm@turtle-entertainment.de>; PostgreSQL-patches <pgsql-patches@postgresql.org>
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> 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())
> Tom, is this the fix you were thinking of? Seems like it would be a
> good improvement.
Please fix the comments not only the code ;-). Other than that,
this is exactly what I meant.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* invalid multibyte character for locale
@ 2006-01-30 16:23 Anjan Dave <adave@vantage.com>
0 siblings, 0 replies; 11+ messages in thread
From: Anjan Dave @ 2006-01-30 16:23 UTC (permalink / raw)
To: pgsql-admin
Hi,
Recently I restored a database from 7.4.1 (RHAS3.0) to 8.0.3 (RHAS4.0),
and now we are running into locale issues:
[22:03] WARN SECUserDAO () - Problem retrieving user by username.
org.sourceforge.jxutil.sql.I18nSQLException: sqlError[invalid multibyte
character for locale]
...
ERROR: invalid multibyte character for locale
HINT: The server's LC_CTYPE locale is probably incompatible with the
database e
ncoding.
ERROR: invalid multibyte character for locale
HINT: The server's LC_CTYPE locale is probably incompatible with the
database e
ncoding.
The original database is in UNICODE, and so is the new database, on
8.0.3. I am reading the pg doc about locale and character set encoding,
but with the source and target database having been created with same
encoding, I am not sure why the LC_CTYPE may not be compatible with
UNICODE.
Any help is appreciated.
Thanks,
Anjan
This email message and any included attachments constitute confidential
and privileged information intended exclusively for the listed
addressee(s). If you are not the intended recipient, please notify
Vantage by immediately telephoning 215-579-8390, extension 1158. In
addition, please reply to this message confirming your receipt of the
same in error. A copy of your email reply can also be sent to
mailto:support@vantage.com <blocked::mailto:support@vantage.com> .
Please do not disclose, copy, distribute or take any action in reliance
on the contents of this information. Kindly destroy all copies of this
message and any attachments. Any other use of this email is prohibited.
Thank you for your cooperation. For more information about Vantage,
please visit our website at http://www.vantage.com.
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2006-01-30 16:23 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 21:10 invalid multibyte character for locale Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 21:12 ` Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-23 23:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 07:41 ` Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 15:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-02-24 16:10 ` Joel Fradkin <jfradkin@wazagua.com>
2005-02-24 17:22 ` Bjoern Metzdorf <bm@turtle-entertainment.de>
2005-02-24 17:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-03-15 05:26 ` Bruce Momjian <pgman@candle.pha.pa.us>
2005-03-15 05:52 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-01-30 16:23 invalid multibyte character for locale Anjan Dave <adave@vantage.com>
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