From 70198a1524745234c77fe12a1c7a188bbb14c373 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 7 Jan 2011 18:23:28 +0100 Subject: html: Set the output port encoding to match the `charset' custom. * src/guile/skribilo/engine/html.scm (document)[guile-2]: Set the output port's encoding to that of E's `charset' custom. --- src/guile/skribilo/engine/html.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index e743c16..1824349 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -1,7 +1,7 @@ ;;; html.scm -- HTML engine. ;;; -*- coding: iso-8859-1 -*- ;;; -;;; Copyright 2005, 2006, 2007, 2008, 2009 Ludovic Courtès +;;; Copyright 2005, 2006, 2007, 2008, 2009, 2011 Ludovic Courtès ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -609,6 +609,15 @@ ;; Record the file name, for use by `html-file-default'. (markup-option-add! n :file (*destination-file*)) + (cond-expand + (guile-2 + ;; Make sure the output is suitable encoded. + (and=> (engine-custom e 'charset) + (lambda (charset) + (set-port-encoding! (current-output-port) + charset)))) + (else #t)) + (&html-generic-document n title e))) :after (lambda (n e) -- cgit v1.2.3