I would like to inform you that $ symbol is displayed properly on my local machine. but, the same code is deployed in the production environment and there its showing weird symbol �.
i did some research on this symbol and found out that this symbol denote a currency when the symbol for a particular currency is unavailable.
then i go through the source code and found out the below lines of code:
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.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
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.
vikas sharmaa
Ranch Hand
Joined: Jun 28, 2007
Posts: 191
posted
0
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.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
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 agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.