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 7972CD1B1D0 for ; Mon, 26 Jul 2004 18:09:40 -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 19505-10 for ; Mon, 26 Jul 2004 21:09:33 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 354A2D1B16A for ; Mon, 26 Jul 2004 18:09:29 -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 1BpCiu-0003DT-00; Tue, 27 Jul 2004 09:09:28 +1200 Message-ID: <41057305.8070700@opencloud.com> Date: Tue, 27 Jul 2004 09:09:25 +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: Kris Jurka Cc: pgsql-jdbc@postgresql.org Subject: Re: Charset problem on WHERE clause References: In-Reply-To: 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: 200407/300 X-Sequence-Number: 10684 Kris Jurka wrote: > You should not use a SQL_ASCII database. The JDBC driver requires you > database to use a proper encoding for your data. The ?charSet url > parameter was designed to work around this problem for <= 7.2 servers > which didn't come with multibyte encoding support compiled by default, but > it is ignored in => 7.3 servers so it is useless here. I wonder if it's worth supporting the charSet parameter even for >= 7.3: set client_encoding explicitly to SQL_ASCII (which I believe means "no translation") and do the translation to Unicode on the JVM side using whatever charset the user provided. I think most of the encoding details are now isolated from the rest of the protocol logic, so it wouldn't be a very invasive change. My only concern is that it'd encourage people to keep their DBs as SQL_ASCII .. which is just delaying the problem. -O