X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 38368D1B503 for ; Mon, 26 Apr 2004 05:39:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 23831-09 for ; Mon, 26 Apr 2004 05:39:07 -0300 (ADT) Received: from fi.usj.edu.lb (fi.usj.edu.lb [212.98.137.194]) by svr1.postgresql.org (Postfix) with ESMTP id C205AD1B472 for ; Mon, 26 Apr 2004 05:39:02 -0300 (ADT) Received: from fi.usj.edu.lb (localhost [127.0.0.1]) by fi.usj.edu.lb (8.12.3/8.12.3/Debian-6.4) with SMTP id i3Q8dEUt016012 for ; Mon, 26 Apr 2004 11:39:14 +0300 From: fi94te02@fi.usj.edu.lb Received: from 193.95.31.157 (SquirrelMail authenticated user fi94te02) by fi.usj.edu.lb with HTTP; Mon, 26 Apr 2004 11:39:14 +0300 (EEST) Message-ID: <34998.193.95.31.157.1082968754.squirrel@fi.usj.edu.lb> Date: Mon, 26 Apr 2004 11:39:14 +0300 (EEST) Subject: HELP!!!! UNICODE problem To: pgsql-php@postgresql.org X-Mailer: SquirrelMail (version 1.0.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=2.8 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS, FROM_HAS_MIXED_NUMS, NO_REAL_NAME, PLING_PLING X-Spam-Level: ** X-Archive-Number: 200404/38 X-Sequence-Number: 2695 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�matiques El�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 " generates the same. Any help would be appreciated Regards Dani Mezher