bug-gettext
[Top][All Lists]
Advanced

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

Re: gettext binaries for Cygwin


From: Brian Inglis
Subject: Re: gettext binaries for Cygwin
Date: Wed, 4 Dec 2024 13:49:28 -0700
User-agent: Mozilla Thunderbird

On 2024-12-04 13:34, Bruno Haible wrote:
Brian Inglis wrote:
The two patches
    gettext-0.22.5-gettext-runtime-intl-gnulib-lib-localename-unsafe-c.patch
    gettext-0.22.5-gettext-tools-gnulib-lib-localename-unsafe-c.patch
in my understanding have the effect that when a user
    - has set their language preference in the Windows Control Panel,
    - has not any LC_* or LANG environment variable set,
    - uses a Cygwin program that makes use of gettext
      (with the usual setlocale(LC_ALL,"") in main()),
no translations will be produced, thus ignoring the Windows Control Panel
setting.

Is my understanding correct?

Confirmed by Denis Excoffier in the other mail.

If so, why is this patch present? Is it considered to be a feature?

The three patches to {tools,runtime{,/intl}/gnulib/lib/localename_unsafe.c
remove the condition on Cygwin as locale is always set properly (unless users
work to do something bad!)

No, it is not always set properly.

I have a Cygwin 3.5.3 installation, with a ~/.profile and ~/.bashrc that
date from 2023-04-17, that carry the notice "# base-files version 4.3-3",
and that I have not modified myself.

I just changed my Windows 10 installation to use German (Germany) as locale
(in the Windows control panel), logged out, logged in again, started a Cygwin
window, and these are the values of the environment variables:
   LC_CTYPE=de_DE.UTF-8
As a consequence, e.g. 'cp --help' produces English output, not German output.

For a properly working German environment, according to POSIX, there are one
of these three possibilities:
   LC_ALL=de_DE.UTF-8
or
   LANG=de_DE.UTF-8
or (only translations but not numbers or times localized):
   LC_CTYPE=de_DE.UTF-8
   LC_MESSAGES=de_DE.UTF-8
In any of these three cases, 'cp --help' would produce German output.

So, clearly, your assumption "locale is always set properly" is incorrect.
That's why it helps if the localename-unsafe.c patches are dropped.

Please run the commands and share the results I requested from Denis in my recent reply.

This is to confirm that Cygwin is currently using the system/user locale settings and the user expectation and desire is for the regional settings?

Which is how I have my own setup, but the developers disagreed, so I can raise the issue again.

--
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                -- Antoine de Saint-Exupéry



reply via email to

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