[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51321: 29.0.50; date in modelines
From: |
Filipp Gunbin |
Subject: |
bug#51321: 29.0.50; date in modelines |
Date: |
Tue, 02 Nov 2021 19:10:46 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (darwin) |
On 01/11/2021 23:17 +0100, Daniel Martín wrote:
> Alan Third <alan@idiocy.org> writes:
>
>>
>> I know almost nothing about the locale, but from reading the man pages
>> I can't understand why we need to set LC_ALL when we're already
>> setting LANG. Isn't LANG the fallback if LC_ALL isn't set?
>
> You are right. Setting LANG should be all that is needed and I think my
> patch should be reverted.
>
> I'm still confused by Niels's issue, though. Given the screenshot he
> showed, LANG should have been set to da_DK.UTF-8, which should show the
> weekday in Danish:
>
> $ LANG=da_DK.UTF-8 date +%c
> Man 1 Nov 22:41:33 2021
>
> Perhaps the way he launches Emacs inherits a LANG variable already set
> to English. Or there is a wrapper in some custom Emacs NS distribution
> that sets LANG to English beforehand. Anyway, I think it's a
> configuration problem somewhere, unrelated to Emacs, that should be
> handled by the user overriding the time locale manually:
>
> (setq system-time-locale "da_DK.UTF-8")
>
> WDYT? Sorry, in retrospective, I think I didn't do the absolutely
> correct thing here.
I found that coreutils date and macOS date differ in behavior:
coreutils:
LANG=ru_RU.UTF-8 LC_ALL= /opt/local/libexec/gnubin/date +%c
Tue Nov 2 18:55:19 2021
macOS:
LANG=ru_RU.UTF-8 LC_ALL= /bin/date +%c
вторник, 2 ноября 2021 г. 18:54:52
Then, I looked at other LC_ variables, from them only LC_CTYPE=UTF-8 is
set (I don't know by whom, it's certainly not in my shell init files)
And if I invoke coreutils date like this:
LANG=ru_RU.UTF-8 LC_ALL= LC_CTYPE= /opt/local/libexec/gnubin/date +%c
вторник, 2 ноября 2021 г. 19:07:29
The output is localized.
So maybe Daniel also has that LC_CTYPE variable set somewhere in macOS,
and is using coreutils date, and that prevents him from getting
localized date as expected.
- bug#51321: 29.0.50; date in modelines, Filipp Gunbin, 2021/11/01
- bug#51321: 29.0.50; date in modelines, Eli Zaretskii, 2021/11/01
- bug#51321: 29.0.50; date in modelines, Filipp Gunbin, 2021/11/01
- bug#51321: 29.0.50; date in modelines, Eli Zaretskii, 2021/11/01
- bug#51321: 29.0.50; date in modelines, Filipp Gunbin, 2021/11/01
- bug#51321: 29.0.50; date in modelines, Alan Third, 2021/11/01
- bug#51321: 29.0.50; date in modelines, Daniel Martín, 2021/11/01
- bug#51321: 29.0.50; date in modelines, Niels Søndergaard, 2021/11/01
- bug#51321: 29.0.50; date in modelines,
Filipp Gunbin <=
- bug#51321: 29.0.50; date in modelines, Stefan Kangas, 2021/11/02
- bug#51321: 29.0.50; date in modelines, Stefan Kangas, 2021/11/09
- bug#51321: 29.0.50; date in modelines, Filipp Gunbin, 2021/11/09
- bug#51321: 29.0.50; date in modelines, Filipp Gunbin, 2021/11/01