tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Moors" <willemsl...@gmail.com>
Subject Migrating to tomcat 6 gives formatted currency amounts problem
Date Wed, 10 Sep 2008 15:27:51 GMT
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)

What can be the problem, is there some extra locale configuration that needs
to be done ?

Thanks for your answer,

Regards,

Willem

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message