pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: fi94te02@fi.usj.edu.lb
To: pgsql-php@postgresql.org
Subject: HELP!!!! UNICODE problem
Date: Mon, 26 Apr 2004 11:39:14 +0300 (EEST)
Message-ID: <34998.193.95.31.157.1082968754.squirrel@fi.usj.edu.lb> (raw)

Hello,

    I am using postgresql and PHP to develop an application supporting
English/French/Arabic Data. I am using PHP5RC1 and Postgresql 7.4.2

    When the user enters french caracters (é,è,...) I get the following error.

====================

    Warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid
byte sequence for encoding "UNICODE": 0xe96d61 in
/usr/local/apache2/htdocs/Classes/DBAdapter.class.php on line 27
====================

I managed to save my SQL string into a file. When open with vi, the file reads
==============
update classe set code='MATE',description='Mathématiques
Elémentaires',cycle='SEC',classesuperieure=NULL,info=NULL where code='MATE'
~
==============

whereas the command cat shows

==============
update classe set code='MATE',description='Math&#65533;matiques El&#65533;mentaires',cycle
='SEC',classesuperieure=NULL,info=NULL where code='MATE'
==============

I tried to figure out what to do; when I copy and paste the content of the
file into the "psql" tool, it works perfectly and I can see the accented
letters in my browser; whereas the psql's command "\i <filename>" generates
the same.

Any help would be appreciated

Regards
Dani Mezher




view thread (5+ messages)  latest in thread

Message-ID: <34998.193.95.31.157.1082968754.squirrel@fi.usj.edu.lb>
Permalink:  ../34998.193.95.31.157.1082968754.squirrel@fi.usj.edu.lb/
Also on:    postgresql.org/message-id/34998.193.95.31.157.1082968754.squirrel@fi.usj.edu.lb

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: fi94te02@fi.usj.edu.lb
  Subject: Re: HELP!!!! UNICODE problem
  In-Reply-To: <34998.193.95.31.157.1082968754.squirrel@fi.usj.edu.lb>
  References: <34998.193.95.31.157.1082968754.squirrel@fi.usj.edu.lb>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox