From c8adc394b79e928d38722327cc18c7dfc6f1cb26 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 20 Nov 2009 11:55:18 +0100 Subject: Choose the right encoding for input documents. * src/guile/skribilo.scm (skribilo): Use the right encoding for the current input port. * src/guile/skribilo/evaluator.scm (load-document, include-document): Likewise. * doc/user/user.skb: Add a `coding:' comment for use by Guile at the top. --- src/guile/skribilo.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/guile/skribilo.scm') diff --git a/src/guile/skribilo.scm b/src/guile/skribilo.scm index 7208a00..7d066da 100644 --- a/src/guile/skribilo.scm +++ b/src/guile/skribilo.scm @@ -387,6 +387,11 @@ options." (if input-file (with-input-from-file input-file (lambda () + (cond-expand (guile-2 + ;; Use the encoding specified by the `coding:' + ;; comment. + (let ((p (current-input-port))) + (set-port-encoding! p (file-encoding p))))) (doskribe user-module))) (doskribe user-module)) -- cgit v1.2.3