X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F0B7555F03 for ; Wed, 23 Feb 2005 23:58:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88646-02 for ; Wed, 23 Feb 2005 23:58:45 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 930C15597D for ; Wed, 23 Feb 2005 23:58:44 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1NNwl3E023515; Wed, 23 Feb 2005 18:58:47 -0500 (EST) To: Bjoern Metzdorf Cc: "Pgsql-Admin (E-mail)" Subject: Re: invalid multibyte character for locale In-reply-to: <421CF1CE.3000800@turtle-entertainment.de> References: <421CF15C.6010306@turtle-entertainment.de> <421CF1CE.3000800@turtle-entertainment.de> Comments: In-reply-to Bjoern Metzdorf message dated "Wed, 23 Feb 2005 22:12:46 +0100" Date: Wed, 23 Feb 2005 18:58:47 -0500 Message-ID: <23514.1109203127@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/273 X-Sequence-Number: 16441 Bjoern Metzdorf 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