Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8242940

Wrong CLDR decimal format symbols for fr_CH

    XMLWordPrintable

    Details

      Description

      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


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: