Re: LC_TIME affects mutt's charset value

2021-12-16 Thread Kevin J. McCarthy

On Thu, Dec 16, 2021 at 03:15:29PM +0100, Petr Pisar wrote:

V Thu, Dec 16, 2021 at 02:21:40PM +0100, Daan van Rossum napsal(a):

With the following locale variables set
# env | grep -e LANG -e LC_
LANG=en_US.UTF-8
LC_TIME=en_DE.UTF-8



Is en_DE.UTF-8 a valid locale on your system? "local -a" on my glibc system
does not recognize it.


This does seem to be the problem.

Mutt calls nl_langinfo(CODESET), and that is returning "ANSI_X3.4-1968" 
when LC_TIME is set to the (bogus) value above.


Mutt then canonicalizes that return value back to us-ascii.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: LC_TIME affects mutt's charset value

2021-12-16 Thread Petr Pisar
V Thu, Dec 16, 2021 at 02:21:40PM +0100, Daan van Rossum napsal(a):
> With the following locale variables set
>   # env | grep -e LANG -e LC_
>   LANG=en_US.UTF-8
>   LC_TIME=en_DE.UTF-8
Is en_DE.UTF-8 a valid locale on your system? "local -a" on my glibc system
does not recognize it.

> Mutt sets charset to "us-ascii"

Maybe Mutt falls back to default locale because the requested one is invalid.

-- Petr


signature.asc
Description: PGP signature


LC_TIME affects mutt's charset value

2021-12-16 Thread Daan van Rossum
With the following locale variables set
# env | grep -e LANG -e LC_
LANG=en_US.UTF-8
LC_TIME=en_DE.UTF-8
Mutt sets charset to "us-ascii"
# mutt
:set  ?charset
charset="us-ascii"

Now, when I do not set LC_TIME mutt sets charset to "utf-8"
# unset LC_TIME
# mutt
:set  ?charset
charset="utf-8"

Is this a bug or a feature?

The reason why I set LC_TIME is because I like the 24h time format.

Thanks, Daan


signature.asc
Description: PGP signature