On Mon, Jan 12, 2026 at 06:21:55PM +0000, Gavin Smith wrote:
> 
> I don't understand the reasons but the conclusion seems to be that we
> have to use this round-about way of setting the locale, which we've
> come to after some amount of trial and error.

I tested something similar in Perl on OpenBSD 7.8, and it does not work.
With LC_MESSAGES it did not work at all, with LC_CTYPE the switch to the
locale happens, but there is no translation.  Here is the code I tested
(at the beginning of _switch_messages_locale:

  if (defined($working_locale)) {
    $ENV{'LC_ALL'} = $working_locale;
    $ENV{'LANG'} = $working_locale;
    $locale = POSIX::setlocale(LC_MESSAGES, "");
    $locale = POSIX::setlocale(LC_CTYPE, "");
  }
  if (!defined($locale)) {
    $ENV{'LC_ALL'} = "en_US.UTF-8";
    $ENV{'LANG'} = "en_US.UTF-8";
    $locale = POSIX::setlocale(LC_MESSAGES, "");
    $locale = POSIX::setlocale(LC_CTYPE, "");
  }

-- 
Pat

      • ... Gavin Smith
  • Re: ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
    • ... Gavin Smith
      • ... 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
      • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
  • 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