From: Artur Pietruk <arturp@plukwa.net>
To: Nathalie Boulos <nathalieboulos@hotmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: problem: Postgresql and Unicode
Date: Sat, 22 Feb 2003 00:13:57 +0100
Message-ID: <20030221231356.GE10190@plukwa.net> (raw)
In-Reply-To: <F136TWApLOjzbBmLGQ50000b8e8@hotmail.com>
References: <F136TWApLOjzbBmLGQ50000b8e8@hotmail.com>
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
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-admin@postgresql.org
Cc: arturp@plukwa.net, nathalieboulos@hotmail.com
Subject: Re: problem: Postgresql and Unicode
In-Reply-To: <20030221231356.GE10190@plukwa.net>
References: <F136TWApLOjzbBmLGQ50000b8e8@hotmail.com> <20030221231356.GE10190@plukwa.net>
* 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