Re: Please help - libpq API - Mailing list pgsql-admin

From Pradeepkumar, Pyatalo (IE10)
Subject Re: Please help - libpq API
Date
Msg-id 77ED2BF75D59D1439F90412CC5B109742434FB01@ie10-sahara.hiso.honeywell.com
Whole thread Raw
In response to Please help - libpq API  ("Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar.Pyatalo@honeywell.com>)
List pgsql-admin
Hi all,

Thanks for all your patience and help. I really appreciate this group as I
have always found someone or the other replying to my questions. For my
problem, I set the client and server encoding to UNICODE. The problem that
libpq functions does not support wide characters still remains. I am
converting the wide character strings to proper UTF-8 format and passing it
to the libpq functions. But I still feel that libpq functions should support
wide character datatypes also.

Regs,
Pradeep

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, September 08, 2005 10:17 PM
To: Alvaro Herrera
Cc: Pradeepkumar, Pyatalo (IE10); pgsql-admin@postgresql.org;
pgsql-novice@postgresql.org
Subject: Re: [ADMIN] Please help - libpq API

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-admin by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: Disabling WAL for bulk data loads
Next
From: "Yogvinder Singh"
Date:
Subject: index error :- index ------ not a btree