From: | "Schuhmacher, Bret" <Bret(dot)Schuhmacher(at)Aspect(dot)com> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: LC_CTYPE question |
Date: | 2005-02-01 13:36:48 |
Message-ID: | 98E4F4D46DACD0479C96D7356D5C37356B03EF@sac1exch3.aspect.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Nevermind, I went ahead and did the initdb --locale=C and reloaded the
db. Now the Encoding on the db is SQL_ASCII (instead of UNICODE) and
the queries work fine. Pg_dump is your friend! ;-)
Rgds,
Bret
> -----Original Message-----
> From: pgsql-novice-owner(at)postgresql(dot)org
> [mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of
> Schuhmacher, Bret
> Sent: Tuesday, February 01, 2005 8:04 AM
> To: pgsql-novice(at)postgresql(dot)org
> Subject: [NOVICE] LC_CTYPE question
>
> 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
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Kjetil Haaland | 2005-02-01 14:19:23 | Re: function returning a row |
Previous Message | Schuhmacher, Bret | 2005-02-01 13:03:43 | LC_CTYPE question |