Re: encoding problem - Mailing list pgsql-novice

From John DeSoi
Subject Re: encoding problem
Date
Msg-id CFC2F354-28E2-40A2-B2A3-9853D2E1A8AC@pgedit.com
Whole thread Raw
In response to Re: encoding problem  ("Zouari Fourat" <fourat@gmail.com>)
List pgsql-novice
On Mar 5, 2006, at 6:07 AM, Zouari Fourat wrote:

> i get this error (using adodb from php) :
>
> ---------------------------------------------------------------
> postgres7 error: [-1: ERREUR:  Séquence d'octets invalide pour le
> codage «UNICODE» : 0xe96869] in EXECUTE("INSERT INTO hotqueues
> (tcontent) VALUES('Méhiya c mon nom')")
> ---------------------------------------------------------------
>
> when copy-pasting that INSERT query into phppgadmin or psql console,
> the query is executed with no error.


The problem is most likely the wrong client_encoding setting in php.
In php, execute the the SQL query "SHOW client_encoding" and see what
you get. If you are not using multi-byte strings in php, my guess is
you want "SET client_encoding TO 'LATIN1'" or something similar to
fix it.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-novice by date:

Previous
From: "Zouari Fourat"
Date:
Subject: Re: encoding problem
Next
From: "Nagita Karunaratne"
Date:
Subject: exporting data from one DB to another asynchronously