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 7867514B287D for ; Mon, 9 Aug 2004 07:10:15 -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 52953-05 for ; Mon, 9 Aug 2004 10:10:08 +0000 (GMT) Received: from smtp.ies.inet6.fr (www02.ies.inet6.fr [62.210.153.202]) by svr1.postgresql.org (Postfix) with ESMTP id 7F81614B2822 for ; Mon, 9 Aug 2004 07:09:31 -0300 (ADT) Received: by smtp.ies.inet6.fr (Postfix, from userid 101) id AD1FE4815C; Mon, 9 Aug 2004 12:09:19 +0200 (CEST) Received: from localhost (web02 [127.0.0.1]) by smtp.ies.inet6.fr (Postfix) with ESMTP id 085654815D; Mon, 9 Aug 2004 12:09:18 +0200 (CEST) Received: from smtp.ies.inet6.fr ([127.0.0.1]) by localhost (web02.inet6.ies [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10459-09; Mon, 9 Aug 2004 12:09:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by smtp.ies.inet6.fr (Postfix) with SMTP id 22DB44815C; Mon, 9 Aug 2004 12:09:17 +0200 (CEST) To: oliver@opencloud.com Cc: pgsql-jdbc@postgresql.org From: Alexandre Aufrere Reply-To: alexandre.aufrere@inet6.fr X-Apparently-from: alexandre.aufrere@inet6.fr@localhost X-Remote-Host: 62.210.105.37 User-Agent: NikoSoft WebMail 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> <4116150E.2080302@opencloud.com> Date: Mon, 09 Aug 2004 12:09:17 +0200 Subject: Re: Problems with charsets, investigated... Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-Id: <20040809100917.22DB44815C@smtp.ies.inet6.fr> X-Virus-Scanned: by IES Virus/Spam scanner at inet6.ies X-Spam-Trusted: X-Spam-DCC: sgs_public_dcc_server: web02.inet6.ies 1199; Body=1 Fuz1=1 Fuz2=1 X-Spam-Assassin: No hits=0.1 required=4.5 X-Spam-Untrusted: X-Spam-Pyzor: Reported 0 times. X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/67 X-Sequence-Number: 10789 Erm, ok.. I should have investigated deeper before. Apparently someone committed in the cvs an with an old, buggy version of DODS, which was reading the fields with an InputStreamReader, getting the data with getBinaryStream. So you can imagine what was happening ! The correct new version uses getCharacterStream, and of course there is no problem. Thanx a lot for your help, as it helped me a lot to narrow my investigation ! Regards, Alexandre Aufrere ---------------------------------------------------- De : Oliver Jowett A : alexandre.aufrere@inet6.fr Objet : Re: [JDBC] Problems with charsets, investigated... Date : Sun, 08 Aug 2004 23:57:02 +1200 > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend