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

Host Locale Provider getDisplayCountry returns error message under non-English Win10

    Details

    • Subcomponent:
    • Resolved In Build:
      b12
    • CPU:
      x86_64
    • OS:
      windows_10

      Backports

        Description

        Under Windows 10 Japanese, Locale.getDisplayCountry() shows an error message, if Host Locale Provider is used (-Djava.locale.providers=HOST).

        Test sample:
        jshell -R-Djava.locale.providers=HOST
        jshell> (new java.util.Locale("ar","AE")).getDisplayCountry();

        Result:
        "\u4e0d\u660e\u306a\u5730\u57df (AE)" (Converted by native2ascii)
        This is the translated Japanese message of "Unknown Region (AE)".

        Expected result:
        "United Arab Emirates"

        Windows Server 2012R2 and earlier returned "United Arab Emirates" expectedly.
        Windows Server 2016 has the same symptom.
        English environment has no problem.

        Evaluation:
        The current code compares "Unknown Region (" with the result, but it could be translated.
        The attached file contains the messages in all 38 Language Packs of Windows Server 2016 DVD.
        I believe we can compare it with "("+RegionCode+")".
        I also verified all actual strings of Country/Region in 38 languages didn't hit the condition.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tnakamura Toshio Nakamura
                  Reporter:
                  tnakamura Toshio Nakamura
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: