Java numberingSystem doesn't follow CLDR defination on some locales

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • None
    • Affects Version/s: 9
    • Component/s: core-libs

      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);
      ----------------------------------------------------------

            Assignee:
            Naoto Sato
            Reporter:
            Daisy Zhou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: