-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b12
-
Verified
Steps:
Tests number format consistency between CLDR and Java, using 0.56 as input.
For example: on locale pt_PT. The pattern of decimalFormat is "#.##0,###" (group is "." and decimal is ",") in CLDR pt.xml file.
To compare the output format between CLDR and Java, by running below code.
public void javaNumberOutput() {
String a="0.56";
Locale target = Locale.forLanguageTag("pt-PT");
double d = Double.valueOf(a).doubleValue();
String outString = NumberFormat.getNumberInstance(target).format(d);
System.out.println("expected:" + outString);
}
Result:
Following CLDR decimalFormat, the output should be 0,56, but actually the output of below code is 0$56.
Tests number format consistency between CLDR and Java, using 0.56 as input.
For example: on locale pt_PT. The pattern of decimalFormat is "#.##0,###" (group is "." and decimal is ",") in CLDR pt.xml file.
To compare the output format between CLDR and Java, by running below code.
public void javaNumberOutput() {
String a="0.56";
Locale target = Locale.forLanguageTag("pt-PT");
double d = Double.valueOf(a).doubleValue();
String outString = NumberFormat.getNumberInstance(target).format(d);
System.out.println("expected:" + outString);
}
Result:
Following CLDR decimalFormat, the output should be 0,56, but actually the output of below code is 0$56.
- duplicates
-
JDK-8187711 Wrong decimal format symbols for pt_PT locale
- Closed