pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan de Visser <jdevisser@digitalfairway.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Problems with charsets, investigated...
Date: Sat, 7 Aug 2004 23:12:36 -0400
Message-ID: <200408072312.36614.jdevisser@digitalfairway.com> (raw)
In-Reply-To: <41158FFB.9060101@opencloud.com>
References: <20040806144335.933C4400E5@smtp.ies.inet6.fr>
	<20040807084125.A6091400E5@smtp.ies.inet6.fr>
	<41158FFB.9060101@opencloud.com>

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!
--------------------------------------------------------------



view thread (12+ messages)  latest in thread

Message-ID: <200408072312.36614.jdevisser@digitalfairway.com>
Permalink:  ../200408072312.36614.jdevisser@digitalfairway.com/
Also on:    postgresql.org/message-id/200408072312.36614.jdevisser@digitalfairway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: jdevisser@digitalfairway.com
  Subject: Re: Problems with charsets, investigated...
  In-Reply-To: <200408072312.36614.jdevisser@digitalfairway.com>
  References: <20040806144335.933C4400E5@smtp.ies.inet6.fr> <20040807084125.A6091400E5@smtp.ies.inet6.fr> <41158FFB.9060101@opencloud.com> <200408072312.36614.jdevisser@digitalfairway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox