Subject: Re: bug#22905: GUILE_INSTALL_LOCALE produces unavoidable noise

From: Andy Wingo <[email-masked]>
Date: Sun, 07 Aug 2016 23:58:11 +0200

On Fri 04 Mar 2016 15:13, Zefram <[email-masked]> writes:

> GUILE_INSTALL_LOCALE=1 breaks some of the robustness of non-locale-using
> programs, marring their stderr output if the environment's locale settings
> are faulty.

I believe this is consistent with other programs which call setlocale,
notably Perl and Bash.  I think the right way to avoid the output is to
avoid the call to setlocale, and Guile offers the GUILE_INSTALL_LOCALE=0
knob to do this.

> However, if it is deemed to be essential that Guile attempt the implicit
> setlocale and gripe about its failure, then the message should not
> precede or otherwise mix with the actual program run.  The message should
> be emitted *instead of* running the program, declaring the absolute
> incompatibility of the Guile framework with this environmental condition.

Your suggestion is not what Perl or Bash does, FWIW.  But it is
possible -- we could emit an error and require the user to run with
GUILE_INSTALL_LOCALE=0.  Or we could add that suggestion to the
warning.  Probably adding the suggestion to the warning is the right
thing; wdyt?  Try "LC_ALL=fasdada perl" for an example.

Andy