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

Return value of GetUserDefaultUILanguage() should be handled as LANGID

    XMLWordPrintable

Details

    Backports

      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

                ysuenaga Yasumasa Suenaga
                ysuenaga Yasumasa Suenaga
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: