Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CCF5F632A4F for ; Mon, 4 Jan 2010 03:59:24 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 52719-02 for ; Mon, 4 Jan 2010 07:59:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yx0-f192.google.com (mail-yx0-f192.google.com [209.85.210.192]) by mail.postgresql.org (Postfix) with ESMTP id EFB756329B1 for ; Mon, 4 Jan 2010 03:59:13 -0400 (AST) Received: by yxe30 with SMTP id 30so17107813yxe.29 for ; Sun, 03 Jan 2010 23:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=3aQU5be362VY8Eo3upVYreauuCO3WxO/MUBh1NxHko4=; b=HpM8KaXYLN14z/OFkjpWlFuZnmgtpd78II6g2CJs2IeNa/oXxUMzN4i6ovCfsM2yAX YFMFqbhF/i4TGg404R1yKPVNjeqvozzVYo3QWnoI1FtK4P46P6sx/LgDRL/YzPHRwSq5 IDI20yjT1+uuMITGjl2wkEFCg+WB4nwCcGwIs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=aYflXt4On/YCrDMnDJ1E2QCJDTXIr8aH0cLG8xRFNh1Js75zCkUbifWk5bh8tfiDw7 Ihn/LyufIL4YvI+kUbZd6iErgi6QfnSToH5r9gylceFybT5XihMKniveSPG6Ip0pPo9l 4WiDayY3Fq6A2PSx8tKaJh8fZCIDVO4Gp8hgQ= MIME-Version: 1.0 Received: by 10.150.117.3 with SMTP id p3mr34117939ybc.287.1262591951877; Sun, 03 Jan 2010 23:59:11 -0800 (PST) Date: Mon, 4 Jan 2010 16:59:11 +0900 Message-ID: <1676b9b1001032359q68df338cpb29051025d6beac6@mail.gmail.com> Subject: Postgres (EUC - JP encoded ) with Unicode MFC Application From: krishnan swaminathan To: pgsql-odbc@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd72a50c9b4e8047c5218f8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.079 tagged_above=-10 required=5 tests=BAYES_05=-1.11, FH_DATE_PAST_20XX=3.188, HTML_MESSAGE=0.001 X-Spam-Level: ** X-Archive-Number: 201001/1 X-Sequence-Number: 10164 --000e0cd72a50c9b4e8047c5218f8 Content-Type: text/plain; charset=ISO-8859-1 Hi , I have an MFC application built with unicode characterset enabled (so CString and the MFC API's expects wide characters) and the postgres db as backend which is EUC - JP encoded. Iam accessing my DB using CRecordset for reading the tables and direct query execution using ExecuteSQL for updation., Both these MFC functions expects wide strings of *2 bytes *but my DB is multibyte encoded of *1 byte*. Can anyone please let me know how to handle this scenario of Unicode application with multibyte encoded DB. Thanks Krish --000e0cd72a50c9b4e8047c5218f8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi ,

I have an MFC application built with unicode charac= terset enabled (so CString and the MFC API's expects wide characters) a= nd the postgres db as backend which is EUC - JP encoded.=A0

Iam accessing my DB using CRecordset for reading the tables and = direct query execution using ExecuteSQL for updation., Both these MFC funct= ions expects wide strings of 2 bytes but my DB is multibyte encoded = of 1 byte. Can anyone please let me know how to handle this scenario= of Unicode application with multibyte encoded DB.

Thanks
Krish
--000e0cd72a50c9b4e8047c5218f8--