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

Calendar [zh_CN]: Locale falls back to CLDR adapter first when -Djava.locale.providers=JRE,CLDR

    • Icon: Enhancement Enhancement
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • 8
    • core-libs
    • Any platform that supports Java 8.

    • b56
    • 8
    • b66

      Run the attached test program, CalendarTest.java. The program tries to load the SHORT_STANDALONE display name of weekday.

      When adapter list is JRE,CLDR, the short display name in CLDR is loaded. I check the resource files in JDK. Format_zh_CN.class and Format_zh.class are in JRE resources. In CLDR resource, there is only Format_zh.class. There is also no standalone.DayAbbreviations in all these files. The expected output should be from JRE adapter, when adapter list is JRE,CLDR.

      This problem only happens in zh_CN. In other locales I checked (en_US, de_DE and ja_JP), the short display name is loaded from resource file in JRE when adapter list is JRE,CLDR. Attached is the screenshot of the output.

          Loading...
          Uploaded image for project: 'JDK'
          1. JDK
          2. JDK-8000964

          Calendar [zh_CN]: Locale falls back to CLDR adapter first when -Djava.locale.providers=JRE,CLDR

            • Icon: Enhancement Enhancement
            • Resolution: Cannot Reproduce
            • Icon: P4 P4
            • 8
            • 8
            • core-libs
            • Any platform that supports Java 8.

            • b56
            • 8
            • b66

              Run the attached test program, CalendarTest.java. The program tries to load the SHORT_STANDALONE display name of weekday.

              When adapter list is JRE,CLDR, the short display name in CLDR is loaded. I check the resource files in JDK. Format_zh_CN.class and Format_zh.class are in JRE resources. In CLDR resource, there is only Format_zh.class. There is also no standalone.DayAbbreviations in all these files. The expected output should be from JRE adapter, when adapter list is JRE,CLDR.

              This problem only happens in zh_CN. In other locales I checked (en_US, de_DE and ja_JP), the short display name is loaded from resource file in JRE when adapter list is JRE,CLDR. Attached is the screenshot of the output.

                    rgoel Rachna Goel (Inactive)
                    yhuang Yong Huang (Inactive)
                    Votes:
                    0 Vote for this issue
                    Watchers:
                    5 Start watching this issue

                      Created:
                      Updated:
                      Resolved:

                        rgoel Rachna Goel (Inactive)
                        yhuang Yong Huang (Inactive)
                        Votes:
                        0 Vote for this issue
                        Watchers:
                        5 Start watching this issue

                          Created:
                          Updated:
                          Resolved: