Re: [ADMIN] Please help - libpq API - Mailing list pgsql-novice

From Tom Lane
Subject Re: [ADMIN] Please help - libpq API
Date
Msg-id 10390.1126198039@sss.pgh.pa.us
Whole thread Raw
In response to Please help - libpq API  ("Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar.Pyatalo@honeywell.com>)
List pgsql-novice
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On Wed, Sep 07, 2005 at 11:40:57PM -0700, Pradeepkumar, Pyatalo (IE10) wrote:
>> Even if somehow if I convert wchar_t *  to char * and provide it to
>> Postgres, how will it differentiate between chinese characters and normal
>> characters ??

> Please note that any string you pass from the client will be interpreted
> using the client_encoding setting.  So maybe what you have to do is just
> set client_encoding to the encoding that the strings are encoded in.

I think his problem is that his data is represented in UCS2 or UCS4
(or some other fixed-width representation) and we don't support those
as client_encoding values AFAIK.  He'll need to do an encoding
conversion to some representation we do support, such as UTF8.

            regards, tom lane

pgsql-novice by date:

Previous
From: "Pradeepkumar, Pyatalo (IE10)"
Date:
Subject: Please help - libpq API
Next
From:
Date:
Subject: Re: Weird SQL Problem