Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Quick parameter value question  RSS feed

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web form that sends a price String (e.g., "�2.99") to a servlet.

Using request.getParameter() at the servlet gives it as "%A32.99". What's the normal way to convert that back to the original "�2.99"?

Cheers,
James
 
arulk pillai
Author
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not just pass the value as 2.99 and let internationalization take care of the currency.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12087
246
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James,

Please check your private messages for an important administrative matter.

Thanks, Andrew
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!