lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows locale support


From: Werner LEMBERG
Subject: Re: Windows locale support
Date: Mon, 16 Oct 2023 12:52:57 +0000 (UTC)

>> >> I've tested LilyPond 2.25.9 within `cmd.exe` of a US version of
>> >> Windows 10 (i.e., the standard language and region setup is for
>> >> the USA), and I can't make it output anything else but US
>> >> English.  It doesn't react to setting any of the `LANGUAGE`,
>> >> `LANG`, or `LC_MESSAGES` environment variables.
> 
> These three sections from the GNU gettext FAQ explain how to debug
> this: [...]

Thanks.  Alas, I'm just a casual Windows user without any experience
in debugging stuff on that platform.  And honestly, I don't really
want to dive into this area...

> If someone sets these environment variables, for example 'LANG', it
> should have an effect on the strings returned by gettext().

I'm right now connecting from my GNU/Linux machine to a Windows
10.0.22621.1848 box via 'ssh' (which eventually leads to a `cmd.exe`
prompt, always in administrator mode, unfortunately).  If I set
`LANG=de` in `cmd`, then execute the `lilypond` binary, there is no
localized output.  However, if I call `far.exe` (the FAR manager,
https://github.com/FarGroup/FarManager/releases) in `cmd`, then
executing `lilypond` from within `far`, I *do* get a German help
message.

My next try was to call `setx LANG de`, exit the current shell, start
a new shell, and tadaa, it works.

> But that is not the usual, common case.  The usual case is that the
> user does not set these environment variables, but instead uses the
> Windows control panel to define the preferred "regional settings".
> This should have an effect on the strings returned by gettext() as
> well.

I think using `setx` is exactly that, since it sets the corresponding
key(s) in a user's Windows registry.

My current conclusion: On Windows 10, environment variables set with
`set` in the current shell are not used by `lilypond`'s 'gettext'
part, only Windows registry values set before starting a shell.

Is this expected?  Can this be changed?

>> within `cmd.exe`
> 
> There, you need also to consider
> https://www.gnu.org/software/gettext/manual/html_node/Working-in-a-Windows-console.html

Calling `set OUTPUT_CHARSET=CP850` (or `setx OUTPUT_CHARSET CP850`)
has no effect, see attached screenshot.  However, since I'm working via
'ssh', this doesn't mean anything.


    Werner

PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]