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



----- Original Message ----- From: "Willem Moors" <[EMAIL PROTECTED]>

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

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

Can it be one of the libraries (*.jar) that is different, that forcec TC6 to
act differently ?

--- Will's Phantom Font Project ---

I been trying to find a way for you to set the font you want for a locale... It does seem to be an option in JAVA... ie I think Java is expecting to find that from a GUI

But here is the whole story....
http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp#core-locale

Notice that on linux there are things like it depends if the font server starts up... yada yada.
I'm totally surprized that its the same JRE...

I think it may be possible that something else is setting the font... and then the JRE is using that. The above link actually gives you a way to find out what font is been picked up...

But... I think this is all wrong anyway... say you get it figured out, and pick Heleva... or whatever... then you now have to tell the browser to use that in CSS or whatever.... its the beginning of a complex cycle...

&pound.... is making it the browsers problem and internally the browser will find a font and make it happen...

And then if someone moves your servlet to a headless linux.... here we go again... is the font there... etc

I think you can get it to work, and it is interesting... but I'm not sure you want to...

I'd luv to know if the theory is right on your system... ie run this

     String s = currencyFormat.format(1623540.00 );
     byte[] ba = s.getBytes();
     String ans = "";
     for (int i = 0; i < ba.length; i++) {
         ans += Integer.toHexString(ba[i]);
     }
     System.out.print("DA BYTES : " + ans);

See if the bytes are changing... ie the fonts are changing...

... that me out of idea's... other than it look like Java's localization can nail you... and I'm now worrying about some of my systems... ha ha.

IE Format your numbers.... but dont include a currency symbol thru Java... use &pound...

Interesting question... thanks
---------------------------------------------------------------------------
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