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 772A85E46C4 for ; Sun, 8 Aug 2004 00:12:39 -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 14892-05 for ; Sun, 8 Aug 2004 03:12:43 +0000 (GMT) Received: from mail.devisser-siderius.com (unknown [207.164.133.174]) by svr1.postgresql.org (Postfix) with ESMTP id D7C985E46C2 for ; Sun, 8 Aug 2004 00:12:32 -0300 (ADT) Received: from [192.168.202.21] (CPE0004e24a1c3f-CM000f9faa78f6.cpe.net.cable.rogers.com [69.194.81.157]) by mail.devisser-siderius.com (8.11.6/8.9.3) with ESMTP id i783Cfw04815 for ; Sat, 7 Aug 2004 23:12:41 -0400 From: Jan de Visser To: pgsql-jdbc@postgresql.org Subject: Re: Problems with charsets, investigated... Date: Sat, 7 Aug 2004 23:12:36 -0400 User-Agent: KMail/1.7 References: <20040806144335.933C4400E5@smtp.ies.inet6.fr> <20040807084125.A6091400E5@smtp.ies.inet6.fr> <41158FFB.9060101@opencloud.com> In-Reply-To: <41158FFB.9060101@opencloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408072312.36614.jdevisser@digitalfairway.com> 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/58 X-Sequence-Number: 10780 On August 7, 2004 10:29 pm, Oliver Jowett wrote: > > 6) Our web app choses to display Java Strings accordingly to > > file.encoding, therefore as ISO-8859-1 > > 7) Bing ! problem: we are now interpreting UTF8-encoded strings (see > > point 2/3) as ISO-8859-1 > > Therefore all the accentuated characters go wrong ! > > This implies that your web app is not transcoding correctly from UTF-16 > (internal string representation) to ISO-8859-1. > > How does your web app use file.encoding exactly? Note that the > file.encoding property does *not* control the default encoding used by > String.getBytes(), as I understand it; the default eencoding is > JVM-controlled from the system's locale settings. Hrm. This rings a bell. We use JBoss 3.2.3, which ships with a broken tomcat. That particular tomcat version hardcodes a transcoding to LATIN1. Caused us a lot of hair-pulling, and we fixed it by patching the offending code in tomcat (in coyote, actually). This is the README in our lib-hacks CVS dir: " This directory contains a patch for tomcat/coyote 4.1.29 as shipped with jboss 3.2.3. It will set the default encoding to UTF-8 as opposed to ISO-8859-1, and will set the encoding on the query string as well as on the request body. The build script will compile the patched files, and add the patched classes to the tomcat jars stored in jboss/server/deploy/jbossweb-tomcat41.sar. " Could this be his problem? JdV!! -- -------------------------------------------------------------- Jan de Visser jdevisser@digitalfairway.com Baruk Khazad! Khazad ai-menu! --------------------------------------------------------------