> From: Bruno Haible <[email protected]>
> Cc: [email protected], [email protected], [email protected]
> Date: Sat, 14 Feb 2026 15:00:46 +0100
> 
> setlocale() is a libc facility.
> 
> gettext() is a GNU libintl facility.
> 
> It is not the libc itself that prohibits us from using
>   setlocale (category, name_of_locale)
> It is that when a program does this, i.e. not call
>   setlocale (category, "")
> the GNU libintl facility cannot do its job properly on some specific systems,
> as explained in [1].

So the problem is that, unless the locale is pushed into the
environment, libintl cannot be sure to know about the modified locale?

If so, I understand why setenv must be used to push the locale into
the environment when the program uses libintl.  But I still don't
understand why after doing so, programs must call
setlocale (LC_ALL, "") and not setlocale (LC_ALL, the-new-locale) --
shouldn't that be equivalent?  And since the Windows setlocale ignores
the environment, the latter is actually preferable (at least on
Windows)?

Thanks.

              • ... Gavin Smith
              • ... pertusus
              • ... Gavin Smith
              • ... Gavin Smith
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
          • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
            • ... Eli Zaretskii
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Eli Zaretskii
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Eli Zaretskii
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Gavin Smith
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
            • ... pertusus
      • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
        • ... Patrice Dumas
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
      • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas

Reply via email to