Re: Please help - libpq API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx] 
Sent: Thursday, September 08, 2005 10:17 PM
To: Alvaro Herrera
Cc: Pradeepkumar, Pyatalo (IE10); pgsql-admin@xxxxxxxxxxxxxx;
pgsql-novice@xxxxxxxxxxxxxx
Subject: Re: [ADMIN] Please help - libpq API 

Alvaro Herrera <alvherre@xxxxxxxxxxxxxx> 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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux