Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DB9C71337B4E for ; Tue, 5 Apr 2011 05:27:36 -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 28288-02 for ; Tue, 5 Apr 2011 08:27:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vserver0403.onit4u.de (vserver0403.onit4u.de [213.133.112.9]) by mail.postgresql.org (Postfix) with SMTP id D1702133616B for ; Tue, 5 Apr 2011 05:27:18 -0300 (ADT) X-PDA-ORIGIN: vserver0403.onit4u.de Received: (qmail 18468 invoked from network); 5 Apr 2011 08:13:22 -0000 Received: by simscan 1.4.0 ppid: 18441, pid: 18465, t: 0.1832s scanners: clamav: 0.96.5/m:47/d:12946 Received: from unknown (HELO ?192.168.10.102?) (josefspa@88.65.248.24) by vserver0403.onit4u.de with SMTP; 5 Apr 2011 08:13:22 -0000 Message-ID: <4D9AD26E.1020300@joops.com> Date: Tue, 05 Apr 2011 10:27:26 +0200 From: Josef Springer User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Hiroshi Inoue 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> <4D9A8EBB.5040703@tpf.co.jp> In-Reply-To: <4D9A8EBB.5040703@tpf.co.jp> 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=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/8 X-Sequence-Number: 10636 Hello Hiroshi, the encoding of the databsase is set to UTF-8. So i think, i must use UTF-8. I have tried allready giving UTF-16 strings, but with the same results. Thanks for your help, Josef Hiroshi Inoue wrote: > 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 > >