gexp: 'mixed-text-file' UTF-8-encodes its output.
authorAndrew Tropin <andrew@trop.in>
Fri, 18 Jun 2021 04:15:36 +0000 (07:15 +0300)
committerLudovic Courtès <ludo@gnu.org>
Wed, 23 Jun 2021 21:35:28 +0000 (23:35 +0200)
* guix/gexp.scm (mixed-text-file)[build]: Call 'set-port-encoding!'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
guix/gexp.scm

index afb9357..187f5c5 100644 (file)
@@ -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))