LC_CTYPE question - Mailing list pgsql-novice

From Schuhmacher, Bret
Subject LC_CTYPE question
Date
Msg-id 98E4F4D46DACD0479C96D7356D5C37356B03EE@sac1exch3.aspect.com
Whole thread Raw
List 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

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Last ID Problem
Next
From: "Schuhmacher, Bret"
Date:
Subject: Re: LC_CTYPE question