aboutsummaryrefslogtreecommitdiff
path: root/src/guile/skribilo/engine/html.scm
diff options
context:
space:
mode:
authorLudovic Courtès2011-01-07 18:23:28 +0100
committerLudovic Courtès2011-01-07 18:23:28 +0100
commit70198a1524745234c77fe12a1c7a188bbb14c373 (patch)
tree3544125bf42e79f47c5e3ea629e598adc497ffbf /src/guile/skribilo/engine/html.scm
parent374fd5cb08ab19792accb1ecc7ac1978ffde7b32 (diff)
downloadskribilo-70198a1524745234c77fe12a1c7a188bbb14c373.tar.gz
skribilo-70198a1524745234c77fe12a1c7a188bbb14c373.tar.lz
skribilo-70198a1524745234c77fe12a1c7a188bbb14c373.zip
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.
Diffstat (limited to 'src/guile/skribilo/engine/html.scm')
-rw-r--r--src/guile/skribilo/engine/html.scm11
1 files changed, 10 insertions, 1 deletions
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 <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2007, 2008, 2009, 2011 Ludovic Courtès <ludo@gnu.org>
;;; 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)