X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0E016D89C6; Thu, 8 Sep 2005 13:47:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51450-02; Thu, 8 Sep 2005 16:47:26 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C7463D89AA; Thu, 8 Sep 2005 13:47:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j88GlJhD010391; Thu, 8 Sep 2005 12:47:19 -0400 (EDT) To: Alvaro Herrera Cc: "Pradeepkumar, Pyatalo (IE10)" , pgsql-admin@postgresql.org, pgsql-novice@postgresql.org Subject: Re: Please help - libpq API In-reply-to: <20050908132544.GC12971@surnet.cl> References: <77ED2BF75D59D1439F90412CC5B109742415CA8D@ie10-sahara.hiso.honeywell.com> <20050908132544.GC12971@surnet.cl> Comments: In-reply-to Alvaro Herrera message dated "Thu, 08 Sep 2005 09:25:44 -0400" Date: Thu, 08 Sep 2005 12:47:19 -0400 Message-ID: <10390.1126198039@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/85 X-Sequence-Number: 18822 Alvaro Herrera 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