Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C6B73B5DE05 for ; Thu, 9 Jun 2011 06:30:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 89472-04 for ; Thu, 9 Jun 2011 09:30:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id C149DB5DD2D for ; Thu, 9 Jun 2011 06:29:57 -0300 (ADT) Received: (qmail 2164 invoked by uid 512); 9 Jun 2011 09:29:50 -0000 Received: from unknown (HELO ?100.0.32.108?) (100.0.32.108) by sd2.tpf-fw-c.co.jp with SMTP; 9 Jun 2011 09:29:50 -0000 Message-ID: <4DF09285.90208@tpf.co.jp> Date: Thu, 09 Jun 2011 18:29:41 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: =?KOI8-R?Q?=F0=CF=D0=CF=D7_=ED=C9=C8=C1=C9=CC_=E0=D2=D8=C5=D7=C9=DE?= CC: "pgsql-odbc@postgresql.org" Subject: Re: Client encoding win866. References: <27EFDA7DA70C1E409421B31ECAA8C9D31DD83EDF90@topmail6> <4DEE3821.8010801@tpf.co.jp> <27EFDA7DA70C1E409421B31ECAA8C9D31DD83EE285@topmail6> In-Reply-To: <27EFDA7DA70C1E409421B31ECAA8C9D31DD83EE285@topmail6> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.242 tagged_above=-10 required=5 tests=BAYES_00=-1.9, DNS_FROM_RFC_BOGUSMX=1.668, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/9 X-Sequence-Number: 10667 (2011/06/08 20:52), Попов Михаил Юрьевич wrote: > >>> Hi. >>> >>> Can you please tell me how to change client encoding in ODBC? >>> >>> I tried after a connection to execute SQLExecDirect (stmthp, "set >>> client_encoding to \" WIN866 \ ";", SQL_NTS) , but the encoding is still >>> a win1251. > >> How do you confirm the client_encoding? > > Few details... > I create connection and before all the bindings of parameters and columns, and before SQLPrepare I do SQLExecDirect(stmthp,"set client_encoding to \"WIN866\";",SQL_NTS); > Then after SQLPrepare, SQLBindParameter and after SQLExecute I get an error: > Error code 22P05 with message ERROR: character 0x83 of encoding "WIN1251" has no equivalent in "MULE_INTERNAL"; Please confirm the database encoding. Isn't it "WIN1251" not "WIN866"? regards, Hiroshi Inoue