Re: encoding problem when creating a database

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: A B <gentosaker(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: encoding problem when creating a database
Date: 2008-07-02 17:00:51
Message-ID: 20080702095824.I41991@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 2 Jul 2008, A B wrote:

> alright, now I have created a new db-cluster with initdb -E UTF8
> --locale=C and the encoding problem still remains when trying to
> access with PHP.
>
> Error ERROR: invalid byte sequence for encoding "UTF8": 0xe56e69 HINT: This
> error can also happen if the byte sequence does not match the encoding
> expected by the server, which is controlled by "client_encoding".

That sequence isn't valid UTF8. What encoding is the PHP script trying to
send data in? If it's something other than UTF8 (for example ISO8859-1),
you need to set client_encoding to the correct encoding.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2008-07-02 17:01:59 Re: Calculating repeating events - functionality lost with the demise of tinterval ?
Previous Message Tom Lane 2008-07-02 16:48:06 Re: encoding problem when creating a database