Re: texinfo-7.2.90 on OpenBSD

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
> 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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.