aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-10-06 01:24:46 +0200
committerLudovic Courtès <ludo@gnu.org>2012-10-07 22:28:07 +0200
commitdf7bbd381352d3241458488d028ba757e206674d (patch)
treea62bf4822c76853f581018a847e8f772d4675f23
parent58ddf10ea35cc918320b43702a5bea5743dbee24 (diff)
downloadguix-df7bbd381352d3241458488d028ba757e206674d.tar
guix-df7bbd381352d3241458488d028ba757e206674d.tar.gz
derivations: Set input port to UTF-8 in `read-derivation'.
* guix/derivations.scm (read-derivation): Set DRV-PORT's encoding to UTF-8.
-rw-r--r--guix/derivations.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index c9db580de6..4ecf85aca2 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -171,6 +171,10 @@ available in STORE, recursively."
'()
x))
+ ;; The contents of a derivation are typically ASCII, but choosing
+ ;; UTF-8 allows us to take the fast path for Guile's `scm_getc'.
+ (set-port-encoding! drv-port "UTF-8")
+
(let loop ((exp (read drv-port))
(result '()))
(match exp