Commit 3383b678 authored by Christian Persch's avatar Christian Persch

guile: Set the default port encoding to UTF-8

This is the encoding that strings returned from 'format' are in,
so since we need all strings to be UTF-8 independently of the locale
encoding, we need to set this explicitly to UTF-8.
(Also guile docs say this is picked up from the locale encoding,
but even though we call setlocale(3), the default port encoding
isn't set, for whatever reason.)
parent 6507de4f
......@@ -18,6 +18,16 @@
(use-modules (aisleriot interface) (ice-9 format) (ice-9 i18n))
;; This is the encoding of strings returned from e.g. 'format',
;; so we need to set this to "UTF-8" since that's what the C side
;; of aisleriot expects. Otherwise as per docs, guile sets this
;; from the locale encoding, which would be wrong if the locale is
;; an not UTF-8 locale, and also it seems that even though we call
;; setlocale(3), the guile side does not pick this up, for whatever
;; reason.
;; Bug #733881.
(fluid-set! %default-port-encoding "UTF-8")
;; Define the usual alias for gettext
(define-public (_ msg) (gettext msg "aisleriot"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment