tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: Migrating to tomcat 6 gives formatted currency amounts problem
Date Thu, 11 Sep 2008 11:42:03 GMT

----- Original Message ----- 
From: "Willem Moors" <>
To: "Tomcat Users List" <>
Sent: Thursday, September 11, 2008 12:36 PM
Subject: Re: Migrating to tomcat 6 gives formatted currency amounts problem

> On Thu, Sep 11, 2008 at 11:35 AM, Mark Hagger 
> <>wrote:
>> You are almost certainly having a problem with (default) character
>> encodings on your system, usual things to check are the encoding that
>> the JVM is using, for example what does:
>> echo $LANG
>> return (usually controlled by what's defined in /etc/sysconfig/i18n -
>> although I'm not familiar with Ubuntu systems).
> echo $LANG gives me this:
> en_US.UTF-8
>> The most likely thing is that the tomcat servlet is effectively
>> generating content in UTF-8, and then trying to return this character to
>> the end client, via a PrintWriter, in ISO1 where the currency symbol in
>> use is not supported by ISO1, hence the '?'.  Alternatively tomcat is
>> returning either ISO1 or UTF-8 characters but not declaring them as such
>> in its response headers, leaving the browser confused and its choosing
>> the wrong "default".  Be useful to know what headers tomcat is returning
>> really.
> But then, it would be the same issue for tomcat 5.5, no ? And there it
> doesn't go wrong...
> Like stated earlier: I rather think it has something to do with the Tomcat 
> 6
> configuration, because all else is equal: same server with same java / 
> same
> webapp / same client(FF4) / .. only in Tomcat 5.5 it does work, and in
> Tomcat 6 it doesn't.
> Thanks for your reply, Mark!
> Regards,
> Willem

Will, I cant see how TC can be influencing it....
You write a char (the pound) to an output stream it appears differently in 
TC is just sendign what it gets...
Its got to be this...
and that is Java... so I conclude... TC 6 is not on the same JDK/JRE as TC 5

You JAVA has changed... must be..

That stuff that you like is LOCALE stuff... and that stuff can all be 
configured from outside Java...

You are choosing a Locale... but if the files in JRE/LIB
are different... its probably picking a wide super new Sun font... which in 
swing will make no diffs... but
where the old JRE was using the something a browser gets... the new GB_SUPER 
font with english flags and the national anthem... confuses current 

.... I think... you looking in the wrong place...

Convert it to bytes... and print that... you will see it... I think

Then just to confince yourself that TC is not doing a weird Arabic header... 
get the header plugin for FireFox... and have a look...
I doubt they diffs...

Have more fun...
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message