guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/05: gexp: 'mixed-text-file' UTF-8-encodes its output.


From: guix-commits
Subject: 05/05: gexp: 'mixed-text-file' UTF-8-encodes its output.
Date: Wed, 23 Jun 2021 17:36:28 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 1f3d7b45349d43e5cc02594083e0cd44ef730992
Author: Andrew Tropin <andrew@trop.in>
AuthorDate: Fri Jun 18 07:15:36 2021 +0300

    gexp: 'mixed-text-file' UTF-8-encodes its output.
    
    * guix/gexp.scm (mixed-text-file)[build]: Call 'set-port-encoding!'.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 guix/gexp.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/guix/gexp.scm b/guix/gexp.scm
index afb9357..187f5c5 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -1921,6 +1921,7 @@ This is the declarative counterpart of 'text-file*'."
   (define build
     (gexp (call-with-output-file (ungexp output "out")
             (lambda (port)
+              (set-port-encoding! port "UTF-8")
               (display (string-append (ungexp-splicing text)) port)))))
 
   (computed-file name build))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]