On Fri, Aug 19, 2016 at 09:43:22AM -0700, Kevin J. McCarthy wrote: > I'm a bit confused by the mutt source code here. The default value of > $locale is "C",
I believe this is the bug. It should be "" (empty string). If none
of the locale environment variables are set, the default used by the
OS is already "C", so explicitly setting that is an error.
> (a leading '!' in the %{...} disables locales, thus the do_locales check).
And this is the reason it does the multiple versions and calls to
setlocale(), as well as the reason using an explicit default is an
error. Calling setlocale(LC_ALL, NONULL(Locale)) will do the right
thing if the default is "".
I think this feature is unfortunate... If the user didn't want dates
formatted according to their locale (which seems odd to me anyway),
the better way to handle it would be to just set LC_TIME. Then there
would be no need to manipulate it in Mutt at all. Just call setlocale
once (well, plus whenever the user sets $locale) and be done with it.
--
Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address. Replying to it will result in
undeliverable mail due to spam prevention. Sorry for the inconvenience.
pgp7uD0HAgf2S.pgp
Description: PGP signature
