Skip site navigation (1) Skip section navigation (2)

Re: encoding problem

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Zouari Fourat <fourat(at)gmail(dot)com>
Cc: nikolay(at)samokhvalov(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: encoding problem
Date: 2006-03-05 15:08:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.
Power Tools for PostgreSQL

In response to

pgsql-novice by date

Next:From: Nagita KarunaratneDate: 2006-03-05 21:24:04
Subject: exporting data from one DB to another asynchronously
Previous:From: Zouari FouratDate: 2006-03-05 11:07:44
Subject: Re: encoding problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group