Subject: Re: bug#12887: Broken pipe while generating guile-procedures.texi

From: [email-masked] (Ludovic Courtès)
Date: Tue, 05 Mar 2013 21:49:21 +0100

Andy Wingo <[email-masked]> skribis:

> On Fri 07 Dec 2012 22:59, [email-masked] (Ludovic Courtès) writes:
>
>> Ooh, I see.  This is related to commit ed4c3739 (see
>> <http://lists.gnu.org/archive/html/guile-devel/2011-12/msg00160.html>).
>>
>> What happens is that the directory name may be correctly decoded when
>> passed as an argument:
>>
>> [ludo@pluto:~/tmp/Courtès]$ strace -f -o ,,s ~/src/guile/meta/guile -L $PWD -c '(set-port-encoding! (current-output-port) "UTF-8")(pk %load-path)'
>>
>> ;;; (("/home/ludo/tmp/Courtès" ...))
>>
>> But then ‘scm_stat’ calls ‘scm_to_locale_string’, which uses the wrong
>> encoding at this point [...]
>
> Nice debugging for a nasty problem.
>
>> So, as mentioned in the thread above, 2.2 will not have this problem.
>> But for 2.0, I can’t even imagine an ugly hack that would help.
>>
>> Thoughts?
>
> What about an environment variable that can tell Guile to do the
> setlocale().  We can set the environment variable during the build so
> that at least the build works, and whisper it to users when they run
> into problems (while noting that the variable will not be read in 2.2).

Yes, sounds like a plan.  ‘GUILE_INSTALL_LOCALE’?

> Or should we go ahead and document it, and simply have its default value
> change between 2.0 and 2.2?

Yes, even better, since the setlocale change will have to be documented
at least in NEWS anyway.

Are you willing to look into it?

Ludo’.