guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with wide characters on upgrading to guile 2.x


From: Andy Wingo
Subject: Re: Problem with wide characters on upgrading to guile 2.x
Date: Sat, 07 Sep 2013 11:07:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

On Mon 02 Sep 2013 10:48, Richard Shann <address@hidden> writes:

> On Thu, 2013-08-22 at 12:14 -0700, Mike Gran wrote:
>> >>  2. In the inner_main of your scm_with_guile call, 
>> 
>> >>  try calling scm_setlocale.  Maybe something like this?
>> >>  (This shouldn't make a difference, I think. 
>> >>  But, if it does, it says something interesting.)
>> >> 
>> >>  scm_setlocale( scm_variable_ref(scm_c_lookup("LC_ALL")), 
>> > scm_from_locale_string("") );
>> > 
>> >>   If that actually works, lemme know.
>> > 
>> > I just pasted the above into the start of inner_main() and like magic,
>> > it has fixed the problem. Is this call ok for guile-1.8 linking too?
>> 
>> I'm not 100% sure, but, I think so.
>
> I have located a problem which arises I think when LC_ALL is not set
> (the actual circumstance I triggered by setting LANG to a language not
> installed):
>
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
> Backtrace:
> In ice-9/boot-9.scm:
>  149: 2 [catch #t #<catch-closure 19194e0> ...]
>  157: 1 [#<procedure 18b80f0 ()>]
> In unknown file:
>    ?: 0 [catch-closure]
>
> ERROR: In procedure catch-closure:
> ERROR: In procedure setlocale: Invalid argument
> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

const char prog[] =
  "(catch #t
     (lambda () (setlocale LC_ALL \"\"))
     (lambda _
       (display \"Locale not supported by the C library.
Falling back to default \\\"C\\\" locale.\\n\"
                (current-error-port))))";
scm_c_eval_string (prog);

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]