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

[Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Environment:

      Pure windows zh_CN

      or windows MUI switched to below setting
      Format locale: S. Chinese
      Display locale: S. Chinese
      System locale (for non-Unicode program): S. Chinese

    • Subcomponent:
    • Introduced In Build:
      b90
    • Introduced In Version:
      8
    • Resolved In Build:
      b04
    • CPU:
      generic
    • OS:
      windows
    • Verification:
      Verified

      Description

      On pure windows zh_CN or windows MUI fully switched to zh_CN (for non-Unicode program: S. Chinses), run attached program:

      java -Djava.locale.providers=JRE,HOST NumberFormatTest zh CN

      The output is saved in file output.txt with UTF-8 encoding. The expected result is ¥7,000.00, where currency symbol is \uffe5 from JRE adapter, but the actual result is ¥7,000.00, where the currency symbol is \u00a5 from the host. The currency symbol from Host is returned even it's JRE,HOST in the providers list.

      If java.locale.providers is not specified, or HOST is not in the list, the expected result, \uffe5 will be returned.

      This problem does not happen in b80, but it happens in b90.

        Attachments

        1. 8027289
          0.9 kB
        2. 8027289
          7 kB
        3. NumberFormatTest.java
          0.5 kB
        4. Untitled 5.png
          Untitled 5.png
          29 kB

          Issue Links

            Activity

              People

              • Assignee:
                naoto Naoto Sato
                Reporter:
                yhuang Yong Huang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: