Lists: | pgsql-bugs |
---|
From: | "Prakash Nair" <prakashblr(at)hotmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2071: ERROR: invalid multibyte character for locale |
Date: | 2005-11-25 11:55:44 |
Message-ID: | 20051125115544.4EDA2F0B3A@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 2071
Logged by: Prakash Nair
Email address: prakashblr(at)hotmail(dot)com
PostgreSQL version: 8.0.4
Operating system: RHES
Description: ERROR: invalid multibyte character for locale
Details:
Hello,
Got the error in postgres console when we do a lower() or upper().
Postgres console gives following error,
ERROR: invalid multibyte character for locale
HINT: The server's LC_CTYPE locale is probably incompatible with the
database encoding.
Can any one please help me, I need to use Unicode encoding for my database.
(Not able to upgrade to postgres 8.10. as I was getting someother issues
when I try to restore database)
Looks forward for anyone's fast reply.
Thanks,
Prakash
From: | tomas(at)tuxteam(dot)de (Tomas Zerolo) |
---|---|
To: | Prakash Nair <prakashblr(at)hotmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2071: ERROR: invalid multibyte character for locale |
Date: | 2005-11-26 06:10:54 |
Message-ID: | 20051126061054.GB1549@www.trapp.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On Fri, Nov 25, 2005 at 11:55:44AM +0000, Prakash Nair wrote:
>
> The following bug has been logged online:
>
> Bug reference: 2071
> Logged by: Prakash Nair
> Email address: prakashblr(at)hotmail(dot)com
> PostgreSQL version: 8.0.4
> Operating system: RHES
> Description: ERROR: invalid multibyte character for locale
> Details:
>
> Hello,
>
> Got the error in postgres console when we do a lower() or upper().
>
> Postgres console gives following error,
>
> ERROR: invalid multibyte character for locale
> HINT: The server's LC_CTYPE locale is probably incompatible with the
> database encoding.
>
> Can any one please help me, I need to use Unicode encoding for my database.
> (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=us_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
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | tomas(at)tuxteam(dot)de (Tomas Zerolo) |
Cc: | Prakash Nair <prakashblr(at)hotmail(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2071: ERROR: invalid multibyte character for locale |
Date: | 2005-11-26 16:21:11 |
Message-ID: | 3609.1133022071@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
tomas(at)tuxteam(dot)de (Tomas Zerolo) writes:
> - 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=us_US.UTF-8''
> just before the server is called (typically in /etc/init.d/postgresql
> or thereabout.
In recent PG versions you can do SHOW LC_COLLATE and/or SHOW LC_CTYPE
to verify the locale settings the server is using. Note that these are
locked down based on the environment seen by initdb --- you can't change
them just by inserting an environment setting into the postmaster start
script.
regards, tom lane
From: | "Prakash Nair" <prakashblr(at)hotmail(dot)com> |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us, tomas(at)tuxteam(dot)de |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2071: ERROR: invalid multibyte character for locale |
Date: | 2005-11-27 11:00:07 |
Message-ID: | BAY22-F176E5002D07E2A34B3E333C1490@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
<html><div style='background-color:'><DIV class=RTE>
<P>Thanks All.</P>
<P>I have got a solution. When we give initdb, given it with --locale=C and created database with 'UNICODE'. </P>
<P>This one worked. as of now everything seems to be working. I hope , there wont be any issues, please let me know, if you have any suggestions.</P>
<P>Thanks,</P>
<P>Prakash.<BR><BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>
<DIV></DIV>From: <I>Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us></I><BR>To: <I>tomas(at)tuxteam(dot)de (Tomas Zerolo)</I><BR>CC: <I>Prakash Nair <prakashblr(at)hotmail(dot)com>, pgsql-bugs(at)postgresql(dot)org</I><BR>Subject: <I>Re: [BUGS] BUG #2071: ERROR: invalid multibyte character for locale</I><BR>Date: <I>Sat, 26 Nov 2005 11:21:11 -0500</I><BR>tomas(at)tuxteam(dot)de (Tomas Zerolo) writes:<BR>> - What is the nevironment of the server process? That is: what does the<BR>> shell command 'locale' say when it is issued in the same environment<BR>> as the server starts? (that is not necessarily the environment you get<BR>> if you start a shell!). Try, e.g. putting ''export LANG=us_US.UTF-8''<BR>> just before the server is called (typically in /etc/init.d/postgresql<BR>> or
thereabout.<BR><BR>In recent PG versions you can do SHOW LC_COLLATE and/or SHOW LC_CTYPE<BR>to verify the locale settings the server is using. Note that these are<BR>locked down based on the environment seen by initdb --- you can't change<BR>them just by inserting an environment setting into the postmaster start<BR>script.<BR><BR>regards, tom lane<BR><BR>---------------------------(end of broadcast)---------------------------<BR>TIP 3: Have you checked our extensive FAQ?<BR><BR> http://www.postgresql.org/docs/faq<BR></FONT></BLOCKQUOTE></div></html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 2.1 KB |