Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 238031337B4E for ; Tue, 5 Apr 2011 00:38:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 54465-06 for ; Tue, 5 Apr 2011 03:38:44 +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 441471337B47 for ; Tue, 5 Apr 2011 00:38:42 -0300 (ADT) Received: (qmail 25502 invoked by uid 512); 5 Apr 2011 03:38:38 -0000 Received: from unknown (HELO ?100.0.32.108?) (100.0.32.108) by sd2.tpf-fw-c.co.jp with SMTP; 5 Apr 2011 03:38:38 -0000 Message-ID: <4D9A8EBB.5040703@tpf.co.jp> Date: Tue, 05 Apr 2011 12:38:35 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Josef Springer CC: pgsql-odbc@postgresql.org Subject: Re: 08.02.04.00 Updating column with Unicode References: <4D985F14.7050108@joops.com> <4D99C535.7030704@tpf.co.jp> <4D99CC03.2020509@joops.com> In-Reply-To: <4D99CC03.2020509@joops.com> Content-Type: text/plain; charset=UTF-8; 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: 201104/6 X-Sequence-Number: 10634 Hi Josef, (2011/04/04 22:47), Josef Springer wrote: > Hi Hiroshi, > > the parameters are bound as an UTF8-encoded bytearray. Because the > interface is controlled by a Smalltalk application, i think the codings > does not help you: > /bytes := v asByteArrayEncoding: #'utf-8'. > p copyAt: 0 from: bytes size: (size := bytes size) startingAt: 1. > p at: size put: 0 > / Unfortunately I know nothing about Smalltalk. Anyway *Unicode* means UTF-16 as for the drivers. Could you try to give utf-16 strings? regards, Hiroshi Inoue > Josef Springer > > Hiroshi Inoue wrote: >> (2011/04/03 20:50), Josef Springer wrote: >>> Hello everybody, >>> >>> I have detected some strange behavior updating columns with Unicodes >>> strings. >>> >>> Environment: >>> PostgreSQL 8.2.5 >>> Database encoding: UTF8 >>> ODBC: PostgreSQL Unicode Version 08.02.04.00 >>> >>> I am updating via ODBC a column (character varying nnn) of a record to >>> an unicoded string. >>> >>> Updating by using the command as one parameterblock >>> 'UPDATE adresse SET company = ''Seifert und Partner KG € 文件'' WHERE id >>> = 1' >>> works right. (the whole parameterblock is encoded to UTF8) >>> >>> Updating the record by using the command 'UPDATE adresse SET company=? >>> WHERE record.id=?' >>> and providing the arguments for ? UTF8-encoded in an extra buffer >>> destroys the columns content. >>> >>> If i update the column with an UTF8 encoded character in the default >>> range (the EURO Sign €), it works. >>> >>> Can anybody give me some hints ? >> >> How do you bind the parameters? >> >> regards, >> Hiroshi Inoue