aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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