Re: BUG #2071: ERROR: invalid multibyte character for locale - Mailing list pgsql-bugs

From tomas@tuxteam.de (Tomas Zerolo)
Subject Re: BUG #2071: ERROR: invalid multibyte character for locale
Date
Msg-id 20051126061054.GB1549@www.trapp.net
Whole thread Raw
In response to BUG #2071: ERROR: invalid multibyte character for locale  ("Prakash Nair" <prakashblr@hotmail.com>)
Responses Re: BUG #2071: ERROR: invalid multibyte character for locale  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Fri, Nov 25, 2005 at 11:55:44AM +0000, Prakash Nair wrote:
>=20
> The following bug has been logged online:
>=20
> Bug reference:      2071
> Logged by:          Prakash Nair
> Email address:      prakashblr@hotmail.com
> PostgreSQL version: 8.0.4
> Operating system:   RHES
> Description:        ERROR:  invalid multibyte character for locale
> Details:=20
>=20
> Hello,
>=20
> Got the error in postgres console when we do a lower() or upper().
>=20
> Postgres console gives following error,
>=20
> ERROR:  invalid multibyte character for locale
> HINT:  The server's LC_CTYPE locale is probably incompatible with the
> database encoding.
>=20
> Can any one please help me, I need to use Unicode encoding for my databas=
e.
> (Not able to upgrade to postgres 8.10. as I was getting someother issues
> when I try to restore  database)

See the related, previous post.

Basically there are four places where encoding might be relevant:

- Did you create the database in utf-8 encoding? (probably yes)

- What is the nevironment of the server process? That is: what does the
  shell command 'locale' say when it is issued in the same environment
  as the server starts? (that is not necessarily the environment you get
  if you start a shell!). Try, e.g. putting ''export LANG=3Dus_US.UTF-8''
  just before the server is called (typically in /etc/init.d/postgresql
  or thereabout.

- What is your client's encoding (issue the SQL command ''SHOW
  CLIENT_ENCODING'' to learn about that (or ''SET CLIENT_ENCODING'' to
  change that)

- What is the locale of your client? (if it's on an unix-like system,
  see above. Otherwise I have no idea).

Hope that helps
-- tomas

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] BUG #2052: Federal Agency Tech Hub Refuses to Accept
Next
From: "Keith Randall"
Date:
Subject: BUG #2072: CPPFLAGS clobbered