From: Mike Gran <spk121@yahoo.com>
To: guile-devel@gnu.org
Subject: Startup locale and environ_locale_charset
Date: Sat, 27 Apr 2019 22:22:12 -0700 [thread overview]
Message-ID: <20190428052212.GA11084@spikycactus.attlocal.net> (raw)
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
next reply other threads:[~2019-04-28 5:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-28 5:22 Mike Gran [this message]
2019-04-28 17:25 ` Startup locale and environ_locale_charset Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190428052212.GA11084@spikycactus.attlocal.net \
--to=spk121@yahoo.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).