Commit 12db9dc8 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.)
(cherry picked from commit 3383b678)
parent 38a7165e
......@@ -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")
;; Feature masks:
(define-public droppable-feature 1)
(define-public scores-disabled 2)
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