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

Return value of GetUserDefaultUILanguage() should be handled as LANGID

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: core-libs
    • Labels:

      Description

      https://mail.openjdk.java.net/pipermail/i18n-dev/2020-January/003061.html

      I checked how JDK detects default language on Windows, but I cannot understand the code in below:

      src/java.base/windows/native/libjava/java_props_md.c:
      ```
      LCID userDefaultUILang = GetUserDefaultUILanguage();
      ```

      According to Microsoft Docs [1], GetUserDefaultUILanguage() returns LANGID. However `userDefaultUILang` is used later as LCID.


      [1] https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getuserdefaultuilanguage

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ysuenaga Yasumasa Suenaga
                Reporter:
                ysuenaga Yasumasa Suenaga
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: