[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: macOS test failures - LC_ALL / LC_CTYPE / LC_MESSAGES

From: Bruno Haible
Subject: Re: macOS test failures - LC_ALL / LC_CTYPE / LC_MESSAGES
Date: Sun, 23 Oct 2022 11:58:01 +0200

Gavin Smith wrote:
> When LC_ALL was restored
> (for the tests, this was to "C") this overrode a change to LC_CTYPE
> that had taken place elsewhere in the code, in the XS paragraph
> formatting module.  This broke iterating over UTF-8 strings, leading
> to the wrong values being passed to wcwidth.
> I fixed this by changing LC_ALL to LC_MESSAGES in gdt, as that was
> the only locale category we needed to change.

Yes, LC_ALL overrides all LC_* values.

Additionally, the values of LC_CTYPE and LC_MESSAGES must be compatible
on glibc systems: They should have the same charset/encoding.
Setting e.g. LC_CTYPE="C" LC_MESSAGES="zh_CN.UTF-8" will not work, because
it will attempt to convert chinese message strings to the encoding of the
"C" locale, which is ASCII.

> However, it had previously been reported that LC_MESSAGES didn't
> work on MS-Windows.

Yes, on native Windows, LC_MESSAGES exists and works only if you are
using either the Gnulib 'setlocale' module or the GNU gettext <libintl.h>
include. Perl doesn't do this; therefore LC_MESSAGES does not exist/work
in Perl on this platform.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]