Re: problem: Postgresql and Unicode - Mailing list pgsql-admin

From Antti Haapala
Subject Re: problem: Postgresql and Unicode
Date
Msg-id Pine.GSO.4.44.0302211134270.25461-100000@paju.oulu.fi
Whole thread Raw
In response to problem: Postgresql and Unicode  ("Nathalie Boulos" <nathalieboulos@hotmail.com>)
List 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


pgsql-admin by date:

Previous
From: "Nathalie Boulos"
Date:
Subject: problem: Postgresql and Unicode
Next
From: "Donald Fraser"
Date:
Subject: Changing the time on the server