LC_CTYPE question

From: "Schuhmacher, Bret" <Bret(dot)Schuhmacher(at)Aspect(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: LC_CTYPE question
Date: 2005-02-01 13:03:43
Message-ID: 98E4F4D46DACD0479C96D7356D5C37356B03EE@sac1exch3.aspect.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I've got a database full of business names in the US. Apparently I've
got some multibyte data I didn't know about... When I run a query that
returns one of these multibyte strings I get this error:

ERROR: invalid multibyte character for locale
HINT: The server's LC_CTYPE locale is probably incompatible with the
database encoding.

My lc_ctype is set to:
lc_ctype | en_US.UTF-8

Is there any way to allow more encoding types? I've read the docs on
encoding and it looks like I need to redo my initdb and reload the db
:-(. When I created my db it got set to UNICODE by default (I didn't
specify one). Which en_US setting will allow multibyte data? Is this
error saying en_US.UTF-8 is incompatible with UNICODE?

FWIW, I have a windows installation running
"PostgreSQL 8.0.0beta3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.2.3 (mingw special 20030504-1)"
And its lc_ctype is "C" and the *exact same data* loaded and it works
fine.

The db in question is
PostgreSQL 8.0.0rc5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Its lc_ctype is en_US.UTF-8

Should I re-run initdb with '--lc_ctype=C'?

Thanks for your insight into this.

Rgds,

Bret

Browse pgsql-novice by date

  From Date Subject
Next Message Schuhmacher, Bret 2005-02-01 13:36:48 Re: LC_CTYPE question
Previous Message John Hansen 2005-02-01 07:31:30 Re: [NOVICE] Last ID Problem