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

Re: invalid multibyte character for locale

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bjoern Metzdorf <bm(at)turtle-entertainment(dot)de>
Cc: "Pgsql-Admin (E-mail)" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: invalid multibyte character for locale
Date: 2005-02-23 23:58:47
Message-ID: 23514.1109203127@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-hackerspgsql-patches
Bjoern Metzdorf <bm(at)turtle-entertainment(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-02-24 01:36:07
Subject: Re: [PATCHES] [pgsql-hackers-win32] Repleacement for src/port/snprintf.c
Previous:From: Christopher BrowneDate: 2005-02-23 22:58:38
Subject: Finding if old transactions are running...

pgsql-admin by date

Next:From: S. C.Date: 2005-02-24 03:25:23
Subject: Statistics Collector & Query Optimizer, any relation?
Previous:From: IndibilDate: 2005-02-23 23:15:08
Subject: Re: PostgreSQL 8.0.1 problem

pgsql-patches by date

Next:From: Tom LaneDate: 2005-02-24 00:31:05
Subject: Re: [PATCHES] A way to let Vacuum warn if FSM settings are low.
Previous:From: Ron MayerDate: 2005-02-23 23:16:07
Subject: A way to let Vacuum warn if FSM settings are low.

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