Try setting the en_US.UTF-8 locale, if the normalised fails
Older versions of the glibc-locales package just contain the UTF-8 variants, not utf8.
This commit is contained in:
parent
d236f05d0f
commit
208122317a
1 changed files with 19 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 hash-table)
|
#:use-module (ice-9 hash-table)
|
||||||
|
#:use-module (rnrs exceptions)
|
||||||
#:use-module (json)
|
#:use-module (json)
|
||||||
#:use-module (squee)
|
#:use-module (squee)
|
||||||
#:use-module (guix monads)
|
#:use-module (guix monads)
|
||||||
|
|
@ -773,7 +774,24 @@ WHERE job_id = $1"
|
||||||
(setenv "GUIX_LOCPATH" guix-locpath) ; restore GUIX_LOCPATH
|
(setenv "GUIX_LOCPATH" guix-locpath) ; restore GUIX_LOCPATH
|
||||||
|
|
||||||
;; Normalise the locale for the inferior process
|
;; Normalise the locale for the inferior process
|
||||||
(inferior-eval '(setlocale LC_ALL "en_US.utf8") inf)
|
(catch
|
||||||
|
'system-error
|
||||||
|
(lambda ()
|
||||||
|
(inferior-eval '(setlocale LC_ALL "en_US.utf8") inf))
|
||||||
|
(lambda (key . args)
|
||||||
|
(simple-format (current-error-port)
|
||||||
|
"warning: failed to set locale to en_US.utf8: ~A ~A\n"
|
||||||
|
key args)
|
||||||
|
(display "trying to setlocale to en_US.UTF-8 instead\n"
|
||||||
|
(current-error-port))
|
||||||
|
(with-exception-handler
|
||||||
|
(lambda (key . args)
|
||||||
|
(simple-format
|
||||||
|
(current-error-port)
|
||||||
|
"warning: failed to set locale to en_US.UTF-8: ~A ~A\n"
|
||||||
|
key args))
|
||||||
|
(lambda ()
|
||||||
|
(inferior-eval '(setlocale LC_ALL "en_US.UTF-8") inf)))))
|
||||||
|
|
||||||
(inferior-eval '(use-modules (srfi srfi-1)
|
(inferior-eval '(use-modules (srfi srfi-1)
|
||||||
(srfi srfi-34)
|
(srfi srfi-34)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue