Re: problem: Postgresql and Unicode

From: Antti Haapala <antti(dot)haapala(at)iki(dot)fi>
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 09:43:54
Message-ID: Pine.GSO.4.44.0302211134270.25461-100000@paju.oulu.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On Fri, 21 Feb 2003, Nathalie Boulos wrote:

> 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'"); )

And in what encoding does PHP send data to backend? It should be in
UTF-8...

perl -e 'print "\xe4\x00\x00"' | iconv -f utf-8 -t utf-8
prints
iconv: illegal input sequence at position 0

iconv doesn't seem to like that either.

--
Antti Haapala

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Donald Fraser 2003-02-21 11:36:56 Changing the time on the server
Previous Message Nathalie Boulos 2003-02-21 09:01:31 problem: Postgresql and Unicode