Richard Shann <richard.sh...@virgin.net>
skribis:

> rshann@DebianBox:~/local/bin$ export LANG=pt_BR.utf8 
> rshann@DebianBox:~/local/bin$ ./denemo
>
> (process:7073): Gtk-WARNING **: Locale not supported by C library.
>       Using the fallback 'C' locale.
> Backtrace:
> In ice-9/boot-9.scm:
>  149: 2 [catch #t #<catch-closure 216f4e0> ...]
>  157: 1 [#<procedure 210e0f0 ()>]
> In unknown file:
>    ?: 0 [catch-closure]
>
> ERROR: In procedure catch-closure:
> ERROR: In procedure setlocale: Invalid argument

Apparently pt_BR.utf8 is not a supported locale on your system.

To gracefully handle this case (like GTK+ does above), just wrap the
‘setlocale’ call:

  (catch 'system-error
    (lambda ()
      (setlocale LC_ALL ""))
    (lambda args
      (format (current-error-port)
              "warning: failed to install locale: ~a~%"
              (strerror (system-error-errno args))))

HTH,
Ludo’.


Reply via email to