[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macOS 12 - cannot override LC_ALL=C setting from environment
From: |
Patrice Dumas |
Subject: |
Re: macOS 12 - cannot override LC_ALL=C setting from environment |
Date: |
Sun, 1 Dec 2024 11:49:39 +0100 |
On Sun, Dec 01, 2024 at 02:41:43AM +0100, Bruno Haible wrote:
> Hi Gavin and Patrice,
>
> > I got it down to a short C program:
> >
>
> 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, "")"
>
> In other words, instead of doing
> setlocale (LC_ALL, "en_US.UTF-8");
> you need to do
> setenv ("LC_ALL", "en_US.UTF-8", 1);
> setlocale (LC_ALL, "");
I did some testing on macos, the following works too:
setenv ("LC_ALL", "en_US.UTF-8", 1);
setlocale (LC_ALL, "en_US.UTF-8");
It did not work with LC_MESSAGES only seems like it needs to be LC_ALL.
Thanks!
--
Pat