X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A4840475AFA for ; Fri, 21 Feb 2003 18:22:25 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 02938-08 for ; Fri, 21 Feb 2003 18:21:57 -0500 (EST) Received: from yoda.plukwa.net (yoda.plukwa.net [213.146.36.61]) by postgresql.org (Postfix) with ESMTP id 8AD5C475BC3 for ; Fri, 21 Feb 2003 18:14:21 -0500 (EST) Received: from arturp by yoda.plukwa.net with local (Exim 3.35 #1 (Debian)) id 18mMMf-0000u9-00; Sat, 22 Feb 2003 00:13:57 +0100 Date: Sat, 22 Feb 2003 00:13:57 +0100 To: Nathalie Boulos Cc: pgsql-admin@postgresql.org Subject: Re: problem: Postgresql and Unicode Message-ID: <20030221231356.GE10190@plukwa.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i From: Artur Pietruk X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/354 X-Sequence-Number: 7552 On Fri, Feb 21, 2003 at 11:01:31AM +0200, Nathalie Boulos wrote: > Hi everyone, Hi! > I'm using postgresql-7.2.2-1 under RedHat linux 8.0. > > I created a unicode DB and trying to insert arabic text through a php > script on the web. I'm getting the following error: > Warning: pg_exec() query failed: ERROR: Invalid UNICODE character sequence > found (0xe40000) > > the client is a IE browser on a win2000 machine, with arabic support. > (I'm forcing client encoding to unicode before i insert data in the DB by > adding the following line in the PHP script: > pg_exec($db,"set client_encoding='unicode'"); ) Could you show us how does your PHP script looks like? Setting client encoding on the postgres side, can be not enough. Did you set encoding of your PHP page to UTF, using content-type meta tag? Make sure, that data you want to insert, is in fact unicode. I'm just wild-guessing, I have never created unicode DB in postgres, but I was fighting with enocding issues here and there. Best regards, -- --- Artur Pietruk, arturp@plukwa.net