This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
It is always worth checking the environment you are printing on. Some command-line windows have difficulty with currency symbols. If you take it away from a country where they use dollars, and print a different symbol, maybe the command-line window can't print and you get ? or a little box.
If you have a short String, try splitting it into chars with the toCharArray method, then print out the numbers (preferably with the %x formatting tag, not available in Java 1.4), then use the Unicode website to work out whether any of the chars corresponds to a currency symbol in the Unicode chart.
Thank you Campbell and Rob for your prompt replies. I just wanted to make sure if its really an environmental issue. Also the Unicode chart helps, I will definitely play with it in java. Thanks again. [ November 11, 2008: Message edited by: Himalay Majumdar ]
Joined: Oct 13, 2005
Joined: Sep 28, 2008
Just after a day I posted the formatting question, another build took place in development and surprisingly the development environment is now showing $15.00 and NOT ?15.00.
How is it possible for the same command line window to print it again. Is it possble for the defect to reappear.
I have a work around for this, but just trying to understand things clearly.