aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-11-01 02:48:20 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-11-01 02:48:20 +0000
commit683b8e10b5e2267d99c88909ab7b20662d414b09 (patch)
tree73e0a49a15fb65a3f53e349ca82e690b9292373d
parent313d2e40b8b6d4457a70dc22e14da1e48e0bd6b1 (diff)
downloadpandoc-683b8e10b5e2267d99c88909ab7b20662d414b09.tar.gz
Set utf-8 encoding in texinfo headers.
Resolves Issue #153. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1617 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Writers/Texinfo.hs6
-rw-r--r--tests/writer.texinfo2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Texinfo.hs b/src/Text/Pandoc/Writers/Texinfo.hs
index 305a1a8d0..840d64d71 100644
--- a/src/Text/Pandoc/Writers/Texinfo.hs
+++ b/src/Text/Pandoc/Writers/Texinfo.hs
@@ -104,8 +104,10 @@ texinfoHeader options (Meta title authors date) = do
then empty
else text $ stringToTexinfo date
- let baseHeader = text $ writerHeader options
- let header = baseHeader $$ extras
+ let baseHeader = case writerHeader options of
+ "" -> empty
+ x -> text x
+ let header = text "@documentencoding utf-8" $$ baseHeader $$ extras
return $ text "\\input texinfo" $$
header $$
text "@ifnottex" $$
diff --git a/tests/writer.texinfo b/tests/writer.texinfo
index 025319ac9..4fae5da6c 100644
--- a/tests/writer.texinfo
+++ b/tests/writer.texinfo
@@ -1,5 +1,5 @@
\input texinfo
-
+@documentencoding utf-8
@macro textstrikeout{text}
~~\text\~~
@end macro