[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Startup locale and environ_locale_charset
From: |
Mike Gran |
Subject: |
Startup locale and environ_locale_charset |
Date: |
Sat, 27 Apr 2019 22:22:12 -0700 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
Starting in the 2.2.x series, the Guile executable calls
setlocale(LC_ALL,"") on startup except when the GUILE_INSTALL_LOCALE
environment variable is set to '0'.
This leads to a call to scm_shell that converts command line arguments
to Guile strings using the current locale. But in doing so, it calls
a function environ_locale_charset() that presumes that setlocale
hasn't been called. This appears to be obsolete, and probably be
replaced with just a call to gnulib's locale_charset().
It is a bit of an issue because it would prevent a possible future
update to gnulib, which no longer provides the get_charset_aliases()
procedure on which environ_locale_charset() has depended.
If there is no objection, I'd like to remove environ_locale_charset().
But doing this would theoretically lead to a user-visible change. If
there were a user that had set the GUILE_INSTALL_LOCALE environment
variable to zero, intentionally bringing up Guile in the "C" locale,
but, still relied on Guile parsing non-ASCII command line arguments in
the environment's LANG-specified locale, it might lead to a different
behavior.
I'm fairly certain that this corner case would never occur in real
life. A search-engine search on GUILE_INSTALL_LOCALE reveals no cases
of anyone having set it to zero.
What do you think?
-Mike Gran
- Startup locale and environ_locale_charset,
Mike Gran <=