pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bjoern Metzdorf <bm@turtle-entertainment.de>
Cc: Pgsql-Admin (E-mail) <pgsql-admin@postgresql.org>
Subject: Re: invalid multibyte character for locale
Date: Wed, 23 Feb 2005 18:58:47 -0500
Message-ID: <23514.1109203127@sss.pgh.pa.us> (raw)
In-Reply-To: <421CF1CE.3000800@turtle-entertainment.de>
References: <421CF15C.6010306@turtle-entertainment.de>
	<421CF1CE.3000800@turtle-entertainment.de>

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



view thread (11+ messages)  latest in thread

Message-ID: <23514.1109203127@sss.pgh.pa.us>
Permalink:  ../23514.1109203127@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23514.1109203127@sss.pgh.pa.us

 · 

reply

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
  Subject: Re: invalid multibyte character for locale
  In-Reply-To: <23514.1109203127@sss.pgh.pa.us>
  References: <421CF15C.6010306@turtle-entertainment.de> <421CF1CE.3000800@turtle-entertainment.de> <23514.1109203127@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