This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This number format returns a currency format for the current default locale. So, i guess, the locale setting for currency in the production environment is changed.
But, i dont have access to production environment. So, my manager has asked me to replicate this issue on my local system by changing the locale setting of windows xp.
i go to control panel -> Regional and Language Options. In the Regional Options tab, i click on customize button and Customize Regional Options dialog box opens. In the Currency tab of this dialog box, i changed the currency symbol to �. And then save the changes.
Then i restart the machine and start our project server. But, on my local machine its still displaying the $ symbol in the excel file. i am not able to replicate the issue.
Please guide me friend to resolve this issue.
Joined: Mar 22, 2005
So the issue is not about the "$"not being displayed properly, but about NumberFormat.getCurrencyInstance returning something other than what was expected.
In that case I'd use NumberFormat.getCurrencyInstance(Locale) to request the currency symbol of whatever locale is being used.
Joined: Jun 28, 2007
Yes Ulf, we can use NumberFormat.getCurrencyInstance(Locale.US) to request the $ currency symbol.
but, the problem is i can't change code in the production environment and test it there directly. so, i need to replicate the issue on local system. for that, i tried the steps mentioned in my previous post. but it doesn't work.
please help me out.
Note: at the start of this topic, i asked a problem, for which we have a solution now. but the problem is only after i replicate the issue on my local machine, my manager will approve my changes to the production.
Joined: Mar 22, 2005
For these purposes one needs a machine that mimics the production machine in every aspect. That should be part of the development/testing pipeline anyway. Developer's machines are never the same as production machines to begin with, so what does or does not happen on them is of little consequence.
What's important is that you know what the problem is, and that your code change fixes it. If your manager then doesn't approve it, and won't get you a replica of the server machine for testing, that's his problem; your work is done.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com