Outline ·
[ Standard ] ·
Linear+
.NET Decimal Point Presentation
TSAnime4000
|
Jun 9 2017, 10:58 PM, updated 7y ago
|
|
When I convert Float or Decimal data type, my friend at different country display wrongly, for example:
One Thousand Three Hundred Twenty Five:
1,325 1.325
after convert to strings, I pass this string to command-line arguments.
|
|
|
|
bandit9956
|
Jun 10 2017, 12:36 AM
|
Getting Started
|
For java, you can convert with Locale as well.
Set Locale.getDefault() while converting will yield you correct.
I face this convert to KHMER and INDONESIA IDR.
|
|
|
|
Eventless
|
Jun 10 2017, 12:41 AM
|
|
Some countries uses the decimal point as a thousand separator and the comma as a decimal separator(1.234.567,89). https://en.wikipedia.org/wiki/Decimal_mark#Countries_using_Arabic_numerals_with_decimal_commaYour program is displaying the right format in those countries. When you run your program on your friend's computer, does it interpret the command line value correctly?
|
|
|
|
TSAnime4000
|
Jun 10 2017, 07:52 PM
|
|
QUOTE(Eventless @ Jun 10 2017, 12:41 AM) Some countries uses the decimal point as a thousand separator and the comma as a decimal separator(1.234.567,89). https://en.wikipedia.org/wiki/Decimal_mark#Countries_using_Arabic_numerals_with_decimal_commaYour program is displaying the right format in those countries. When you run your program on your friend's computer, does it interpret the command line value correctly? I want to pass "Frame Rate", for example, 29.97fps, on those country become some what "29970"
|
|
|
|
Eventless
|
Jun 10 2017, 09:20 PM
|
|
QUOTE(Anime4000 @ Jun 10 2017, 07:52 PM) I want to pass "Frame Rate", for example, 29.97fps, on those country become some what "29970" The link below seems relevant to your problem. https://stackoverflow.com/questions/2423377/what-is-the-invariant-culture
|
|
|
|