Re: problem: Postgresql and Unicode

From: Artur Pietruk <arturp(at)plukwa(dot)net>
To: Nathalie Boulos <nathalieboulos(at)hotmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: problem: Postgresql and Unicode
Date: 2003-02-21 23:13:57
Message-ID: 20030221231356.GE10190@plukwa.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)plukwa(dot)net

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-02-22 02:41:12 Re: Vacuum Question
Previous Message Teddy 2003-02-21 22:37:09 Users and groups