----- Original Message -----
From: "Willem Moors" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, September 11, 2008 5:06 PM
Subject: Re: Migrating to tomcat 6 gives formatted currency amounts problem
I studied the Response Headers for the ajax call that generates the output
and found that for the correct result (ie. in TC55), the content type was
this:
Content-Type text/plain;charset=ISO-8859-1
while for the wrong result (ie. in TC6), the content type was:
Content-Type text/plain
So I added this line to my code :
response.setCharacterEncoding("ISO-8859-15");
(I chose the ISO-..-15 set, to see if my change had effect)
And lo and behold: problem solved !
So would this be the right conclusion : it's TC55 that's wrong here and
not
TC 6 ?
TC55 slaps on the 'charset=ISO-8859-1' by default and TC 6 doesn't.
Anyway, glad to have found the solution, thank you all for chipping in
your ideas!
Regards,
Willem
Didnt realize this was Ajax... ;)
I think browsers default to ISO-8859-1 unless set otherwise anyway... so its
a bit strange.
Maybe the plain text has an effect...
It also depend on the Accept headers that Ajax sent to TC... if it doesnt
specify a required encoding TC is actually at liberty to return whatever it
wants, unless of course you dictate the encoding... I see now why you cant
use £ ;)
I think its just a matter of telling TC what it must do, either from client
header or as you doing... forcing a response.
Its your servlet... and you should probably also be setting the size headers
in your response...
Its a question/answer thing, so there is no bug, unless the client said,
gimme utf/ISO whatever and TC didnt...
So I guess the theory on localized fonts changing just fell thru ;)
I wonder how that actually works... I mean if you set a china locale... it
just has to be a weird font... what happens if it no there?
Set those headers.... Ajax is not automatic either... make sure the system
isnt guessing...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]