X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 666F65E46C1 for ; Sun, 8 Aug 2004 08:57:10 -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 30316-02 for ; Sun, 8 Aug 2004 11:57:07 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id ECBB55E46BF for ; Sun, 8 Aug 2004 08:57:04 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1BtmIS-0004sY-00; Sun, 08 Aug 2004 23:57:04 +1200 Message-ID: <4116150E.2080302@opencloud.com> Date: Sun, 08 Aug 2004 23:57:02 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: alexandre.aufrere@inet6.fr Cc: pgsql-jdbc@postgresql.org Subject: Re: Problems with charsets, investigated... References: <20040806144335.933C4400E5@smtp.ies.inet6.fr> <411400E6.8060704@opencloud.com> <20040807084125.A6091400E5@smtp.ies.inet6.fr> <41158FFB.9060101@opencloud.com> <20040808081854.793B0400E5@smtp.ies.inet6.fr> In-Reply-To: <20040808081854.793B0400E5@smtp.ies.inet6.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200408/62 X-Sequence-Number: 10784 Alexandre Aufrere wrote: >>Can you dump out the *characters* of the problem Strings you get from >>the driver, one character at a time, and see what numeric values you're >>getting and whether they are the right UTF-16 values you expect? i.e. >> >> for (int i = 0; i < str.length(); ++i) { >> System.out.println(" offset " + i + " value " + (int)str.charAt(i)); >> } >> >>Can you provide a pg_dump (LATIN1 encoding I assume) plus sample >>testcase that shows off the problem? > > > well, i'll investigate more tomorrow, at work, and try to set up a simple > test program to try to understand deeper what's going on. > currently, we see the problem by doing a debug output (simply a > System.out) from Enhydra's DODS (which is the relational-object layer). >>From what i've seen in DODS (maybe, though, i didn't dig enough), DODS > does not manipulate Strings coming from the JDBC driver when they are of > type VARCHAR, therefore it shouldn't be the source of the problem. > about the charAt thing, it is as well not correct, i tried... Can you show me the charAt output for some sample data that shows the problem? (and the corresponding string as it's stored in the database) -O