----- Original Message ----- From: "Christopher Schultz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, September 11, 2008 6:42 PM
Subject: Re: Migrating to tomcat 6 gives formatted currency amounts problem


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johnny,

Johnny Kewl wrote:
I think it may be possible that something else is setting the font...
and then the JRE is using that.

I think you're totally confusing yourself about font issues. Java only
interacts with fonts of any kind when running AWT/Swing apps. Webapps
have no interactions with fonts of any kind.

Chris... exactly yes... it turns out he want setting headers, so you absolutely right... but his code is introducing a font into a web app and thats what I'm wondering about...

Forget about the webapp for a moment and just look at his code...

 java.text.NumberFormat currencyFormat=
java.text.NumberFormat.getCurrencyInstance(Locale.UK);
 out.print("Formatted currency (GBP) : " + currencyFormat.format(
1623540.00 ) );

Its generating a pound... the question is, the webapp is not dicatation the font... so I'm asking what font is being used for the pound?

And then yes... it so happens that he has found the encoding that works in text plain... but its a flook, is lucky, its a problem waiting to happen because if I change that locale of his to french, german, chinese... what font is that now going to be... and that will probably definitely not work in default US encoding...

Theres a few problem here...

He *is* introducing a font into a webapp.... and we dont even know what it is?

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

Reply via email to