-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
13.0.2
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
The decimal separator for fr_CH is "." and the group separator is "'", but sun.text.resources.ext.FormatData_fr_CH specifies the wrong where sun.text.resources.ext.FormatData_fr_CH provides it correctly.
REGRESSION : Last worked in version 8u241
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start the example without specification of "java.locale.providers" produces the output "12 500,5" which is wrong.
Start the example with "-Djava.locale.providers=COMPAT,CLDR" produces the output "12'500.5" which is correct.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
12'500.5
ACTUAL -
12 500,5
---------- BEGIN SOURCE ----------
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;
public class LocaleTest {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
NumberFormat f = DecimalFormat.getInstance(new Locale("fr", "CH"));
System.out.println(f.format(12000.5));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Specify "-Djava.locale.providers=COMPAT,CLDR"
FREQUENCY : always
The decimal separator for fr_CH is "." and the group separator is "'", but sun.text.resources.ext.FormatData_fr_CH specifies the wrong where sun.text.resources.ext.FormatData_fr_CH provides it correctly.
REGRESSION : Last worked in version 8u241
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start the example without specification of "java.locale.providers" produces the output "12 500,5" which is wrong.
Start the example with "-Djava.locale.providers=COMPAT,CLDR" produces the output "12'500.5" which is correct.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
12'500.5
ACTUAL -
12 500,5
---------- BEGIN SOURCE ----------
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;
public class LocaleTest {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
NumberFormat f = DecimalFormat.getInstance(new Locale("fr", "CH"));
System.out.println(f.format(12000.5));
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Specify "-Djava.locale.providers=COMPAT,CLDR"
FREQUENCY : always
- duplicates
-
JDK-8202129 Difference in getGroupingSeparator from JDK 8 to 10
- Closed
- relates to
-
JDK-8202129 Difference in getGroupingSeparator from JDK 8 to 10
- Closed