Re: Please help - libpq API

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar(dot)Pyatalo(at)honeywell(dot)com>, pgsql-admin(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: Please help - libpq API
Date: 2005-09-08 16:47:19
Message-ID: 10390.1126198039@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-novice

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jim C. Nasby 2005-09-08 17:18:23 Re: [HACKERS] How to determine date / time of last postmaster restart
Previous Message Tom Lane 2005-09-08 16:28:55 Re: pg_dump error... Follow up

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2005-09-08 22:03:44 Re: Weird SQL Problem
Previous Message Chris Browne 2005-09-08 15:01:01 Re: Execute external program