Send reply to: Tomcat Users List <users@tomcat.apache.org> Date sent: Wed, 10 Sep 2008 17:27:51 +0200 From: Willem Moors <[EMAIL PROTECTED]> To: users@tomcat.apache.org Subject: Migrating to tomcat 6 gives formatted currency amounts problem
> I'm transferring my application from a tomcat 5.5.26 server to tomcat > 6.0.18, and notice that my formatted currency amounts are not being > properly displayed. Instead of a Pound (GBP) sign I get a question > mark within a black diamond (the app works fine in 5.5.26). > > This can easily be emulated. Add the following lines to the > HelloWorldExample.java of the servlet examples in Tomcat 5.5.26 and > those of 6.0.18: > > java.text.NumberFormat currencyFormat= > java.text.NumberFormat.getCurrencyInstance(Locale.UK); > out.print("Formatted currency (GBP) : " + currencyFormat.format( > 1623540.00 ) ); > > This will display the following : > > In Tomcat 6.0.18: Formatted currency (GBP) : <?>1,623,540.00 > (I've emulated the question-mark within diamond here, I'll send you a > screenshot if you want) > > Tomcat 5.5.26: Formatted currency (GBP) : £1,623,540.00 > (depending on your client you may or not may see the pound sign in > front of the above amount) > Works fine for me, fresh install of 6.0.18, changed the HelloWorldExample.java and recompiled. Tried with both IE7 and FF 3. Are you sure you don't have a httpd in front of tomcat? I've seen simillar problem when using apache httpd. I had to turn off the option AddDefaultCharset -Steve O. > What can be the problem, is there some extra locale configuration that > needs to be done ? > > Thanks for your answer, > > Regards, > > Willem > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]