Subject: Re: bug#75379: 30.0.93; project-find-regexp expects "C" or "en" locale

From: Eli Zaretskii <[email-masked]>
Date: Tue, 07 Jan 2025 16:23:05 +0200

> Date: Tue, 7 Jan 2025 16:17:24 +0200
> Cc: [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> On 05/01/2025 22:16, Eli Zaretskii wrote:
> 
> >>> First, the Windows locale-dependent routines don't heed environment
> >>> variables, so setting LANG etc. in the environment will only do what
> >>> you expect if the program in question was either explicitly programmed
> >>> to pay attention to those variables or was linked with Gnulib
> >>> replacements for locale functions.
> >>>
> >>> And second LC_MESSAGES is not supported by Windows locales at all.
> >>
> >> Okay, but first of all, do Grep or Ripgrep use different localizations
> >> on Windows, not just English?
> > 
> > For Grep, it depends on how it was configured when building.  The
> > default configuration uses gettext to translate messages, and this
> > message is marked as translated.
> 
> Okay, but if it's not configured to use gettext, would it just use 
> English, or are there some other mechanisms?

It will output the original English messages unchanged.

> Looking at 
> https://stackoverflow.com/questions/9268379/non-localized-version-of-mingw-msys2, 
> there recommendations are along the standard lines of using either LANG 
> or LC_ALL.

If that's the environment variables, they don't work reliably on
Windows, as I explained.

> > For Ripgrep, I don't know.
> 
> It seems to me Ripgrep is simply not translated, which is just fine for us.

Yes.