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

[HOST provider] only return standalone-style month display name

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, 8u20, 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Environment:

      My test runs on win8.1 professional with format locale switched to Russian.

    • Subcomponent:
    • Introduced In Version:
      8
    • Resolved In Build:
      b101
    • CPU:
      generic
    • OS:
      windows

      Description

      When java.locale.providers is HOST, the display name of a field (month) is standalone style, even it's in date format result or specified as Format style in Calendar.

      Run the attached program MonthTest.java on windows with format locale set to Russian. When provider is JRE, the format style month name is displayed. When -Djava.locale.providers=HOST, the standalone style month name is displayed. Looks like the standalone month name got from the windows is used. The outputs in UTF-8 encoding are attached.

      On the windows control panel, the format style month name is displayed as example. In windows 7 and later, there is format-style month display name in windows. When provider is HOST, the format-style month display name should be loaded.

      LOCALE_RETURN_GENITIVE_NAMES, the genitive names correspond to the format-style display names in Java. http://msdn.microsoft.com/en-us/library/windows/desktop/dd317734%28v=vs.85%29.aspx

        Attachments

        1. controlpanel_format.png
          controlpanel_format.png
          13 kB
        2. month_host.txt
          0.0 kB
        3. month_jre.txt
          0.0 kB
        4. MonthTest.java
          0.6 kB

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: