`locale -s` shows incorrect info on systems where the language is changed after the OOBE

Gennaro Prota gennaro.prota@gmail.com
Fri Apr 29 10:16:36 GMT 2022


Hi,

the locale utility currently gets the system default UI locale (-s option)
via GetSystemDefaultUILanguage().

This is a problem on systems where the default UI language is changed after
the Windows Out of Box Experience (OOBE), because that function will
happily ignore the fact (see <
https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getsystemdefaultuilanguage
>).

FWIW, this is not just theoretical: on my work PC, which was set to Italian
during the first setup (not by me), and is now set to US English, the
locale utility shows:

  $ locale -s
  it_IT

-- 
Gennaro


More information about the Cygwin mailing list