> From: Bruno Haible <[email protected]>
> Cc: [email protected], [email protected]
> Date: Mon, 12 Jan 2026 23:46:56 +0100
> 
> Eli Zaretskii wrote:
> > > I don't know if it's relevant, but MS-Windows' setlocale also doesn't
> > > support LC_MESSAGES.
> > 
> > Also, LC_ALL in the environment doesn't affect the MS-Windows'
> > setlocale.
> 
> Both issues are fixed through libintl's setlocale() (and also through the
> Gnulib 'setlocale' module). So that the same C code
> 
>   setenv ("LC_ALL", "en_US.UTF-8", 1);
>   setlocale (LC_ALL, "");
> 
> works on all platforms, including native Windows.

Does Texinfo use libintl's setlocale or the one from Gnulib?  If yes,
where are their sources in the Texinfo tree?

I didn't yet try to build this pretest, but in Texinfo 7.2 I see this
in gnulib/lib/locale.h:

  #if 0
  # if 0
  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  #   undef setlocale
  #   define setlocale rpl_setlocale
  #   define GNULIB_defined_setlocale 1
  #  endif

which AFAIU tells me that at least Texinfo 7.2 was built without
replacing the Windows' native setlocale with that of Gnulib.

And could you please explain why this "must" is true:

> The reason why it does not work is that this program is not following
> the documented requirement from
> https://www.gnu.org/software/gettext/manual/html_node/C.html :
>   "Programmer must call setlocale (LC_ALL, "")"

What's wrong with calling setlocale with second argument other than
the empty string?

      • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
        • ... Gavin Smith
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Patrice Dumas
      • ... Eli Zaretskii
        • ... Eli Zaretskii
          • ... Gavin Smith
            • ... pertusus
              • ... Gavin Smith
          • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
            • ... Eli Zaretskii
            • ... 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
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Gavin Smith
      • ... Eli Zaretskii
        • ... Patrice Dumas
      • ... Patrice Dumas
        • ... Collin Funk

Reply via email to