Re: invalid multibyte character for locale - Mailing list pgsql-admin

From Tom Lane
Subject Re: invalid multibyte character for locale
Date
Msg-id 23514.1109203127@sss.pgh.pa.us
Whole thread Raw
In response to Re: invalid multibyte character for locale  (Bjoern Metzdorf <bm@turtle-entertainment.de>)
Responses Re: invalid multibyte character for locale  (Bjoern Metzdorf <bm@turtle-entertainment.de>)
List 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

pgsql-admin by date:

Previous
From: Indibil
Date:
Subject: Re: PostgreSQL 8.0.1 problem
Next
From: "S. C."
Date:
Subject: Statistics Collector & Query Optimizer, any relation?