-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
9
This issue exists on locale "ar-LB", "ar-MR", "uz-Cyrl", "uz-Cyrl-UZ".
For example, output number 0.56 against ar-LB locale.
There isn't defaultNumberingSystem property in ar_LB.xml, so as fallback definition should fallback to its parent locale ar and get the defaultNumberingSystem "arab". And then according CLDR defined number format, find the number format of ar-LB is "#٬##0٫###". And according CLDR definition of numbering system, should use Arab text to present the numeric values, since the defaultNumberingSystem is defined "arab". So the output of number 0.56 should be ٠٫٥٦ on ar-LB locale, but actually Java's output is 0,56.
Please use below code to get java's output.
---------------------------------------------------------
String tag ="ar-LB";
Locale target = Locale.forLanguageTag(tag);
double d = Double.valueOf("0.56").doubleValue();
String outString = NumberFormat.getInstance(target).format(d);
System.out.println(outString);
----------------------------------------------------------
For example, output number 0.56 against ar-LB locale.
There isn't defaultNumberingSystem property in ar_LB.xml, so as fallback definition should fallback to its parent locale ar and get the defaultNumberingSystem "arab". And then according CLDR defined number format, find the number format of ar-LB is "#٬##0٫###". And according CLDR definition of numbering system, should use Arab text to present the numeric values, since the defaultNumberingSystem is defined "arab". So the output of number 0.56 should be ٠٫٥٦ on ar-LB locale, but actually Java's output is 0,56.
Please use below code to get java's output.
---------------------------------------------------------
String tag ="ar-LB";
Locale target = Locale.forLanguageTag(tag);
double d = Double.valueOf("0.56").doubleValue();
String outString = NumberFormat.getInstance(target).format(d);
System.out.println(outString);
----------------------------------------------------------