From 1b41a34ce26ffa03e952a069963dabe4b1d82666 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Tue, 20 Aug 2019 17:08:51 -0400 Subject: [PATCH] Use UTF-8 when processing specification tests. * tests/spec/oil.scm: Set the encoding on the input and output ports to UTF-8. --- tests/spec/oil.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/spec/oil.scm b/tests/spec/oil.scm index c09d648..9d91414 100644 --- a/tests/spec/oil.scm +++ b/tests/spec/oil.scm @@ -90,6 +90,11 @@ (format #t "Removing tests from ~a:~%" file) (with-atomic-file-replacement file (lambda (in out) + ;; The Oil tests are encoded as UTF-8, so we + ;; set the encoding on the two ports to ensure + ;; that Guile preserves non-ASCII characters. + (set-port-encoding! in "UTF-8") + (set-port-encoding! out "UTF-8") (let loop ((line (read-line in 'concat)) (transformers #t)) (cond