X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D0F5847590C for ; Sat, 22 Feb 2003 04:40:17 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 30117-05 for ; Sat, 22 Feb 2003 04:40:06 -0500 (EST) Received: from hotmail.com (f136.pav1.hotmail.com [64.4.31.136]) by postgresql.org (Postfix) with ESMTP id 359CA475C22 for ; Sat, 22 Feb 2003 03:51:31 -0500 (EST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 22 Feb 2003 00:51:32 -0800 Received: from 193.227.168.171 by pv1fd.pav1.hotmail.msn.com with HTTP; Sat, 22 Feb 2003 08:51:31 GMT X-Originating-IP: [193.227.168.171] From: "Nathalie Boulos" To: arturp@plukwa.net Cc: pgsql-admin@postgresql.org Subject: Re: problem: Postgresql and Unicode Date: Sat, 22 Feb 2003 10:51:31 +0200 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 22 Feb 2003 08:51:32.0246 (UTC) FILETIME=[98E8CB60:01C2DA4F] X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/356 X-Sequence-Number: 7554 Hi Arthur , Thank you very much for your reply. It was indeed a PHP problem. I just set the default_charset variable in php.ini to utf-8 and it worked. But now I'm facing another problem: How do I convert existing data in an SQL_ASCII database to unicode? here's my problem: I have a SQL_ASCII postgres db containing data. I've updated the pg_database table and set the encoding to UNICODE for this database. I've changed the php.ini charset variable to utf-8. When i add new rows to the table, I can read and write successfully in unicode. But if i want to see the old existing data, i have problems visualizing the special characters (like french lettres with accents). So i guess i have to convert the old data. Has anyone tried this before? Thanks for your help. Regards Nat > >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 > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > >http://archives.postgresql.org _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail