System Local and Percentage Symbol
-
How can I get the position of percentage symbol and format a string ? E.g. 45% or %45 Thanks Orcun Colak
-
How can I get the position of percentage symbol and format a string ? E.g. 45% or %45 Thanks Orcun Colak
-
I was not clear. My mistake sorry. I wanted to format a percentage according to system settings but I do not know how to get system settings. For example in US percentage is formatted like 45% Somewhere else it is %45. How can I output the correct percentage according to system settings. Thanks Orcun Colak
-
I was not clear. My mistake sorry. I wanted to format a percentage according to system settings but I do not know how to get system settings. For example in US percentage is formatted like 45% Somewhere else it is %45. How can I output the correct percentage according to system settings. Thanks Orcun Colak
orcun colak wrote: For example in US percentage is formatted like 45% Somewhere else it is %45. Are you sure about this? Why is there no way to set this in the Control Panel? There's even no mention of a % symbol or position, nothing. The GetLocaleInfo API doesn't mention it either. It seems like the percent sign is universal and I would imagine that so is it's position. At any rate, if you're sure there's (weird) people out there who prefer to see it on the left, you may have to handle it yourself, which isn't too difficult. Regards, Alvaro
Well done is better than well said. -- Benjamin Franklin (I actually prefer medium-well.)
-
orcun colak wrote: For example in US percentage is formatted like 45% Somewhere else it is %45. Are you sure about this? Why is there no way to set this in the Control Panel? There's even no mention of a % symbol or position, nothing. The GetLocaleInfo API doesn't mention it either. It seems like the percent sign is universal and I would imagine that so is it's position. At any rate, if you're sure there's (weird) people out there who prefer to see it on the left, you may have to handle it yourself, which isn't too difficult. Regards, Alvaro
Well done is better than well said. -- Benjamin Franklin (I actually prefer medium-well.)
Actually I found this link in msdn http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vjref98/html/java.text.NumberFormat001.asp Scroll to getPercentInstance() method. Explanation of the method is : "Returns a percentage format for the current default locale." Therefore I assumed Number % format is not universal. Thanks for your help Orcun Colak