From e29e5c5944723074f11b1b8a54f7123971a82f6b Mon Sep 17 00:00:00 2001
From: fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
Date: Thu, 23 Aug 2007 02:16:10 +0000
Subject: [PATCH] Use UTF8 conversion on the extra files loaded in Main.hs
 (header, before, after).  This fixes problems with unicode characters in
 these files.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@879 788f1e2b-df1e-0410-8736-df70ead52e1b
---
 src/Main.hs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Main.hs b/src/Main.hs
index b808074e5..dd9a560af 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -229,7 +229,7 @@ options =
                  (ReqArg
                   (\arg opt -> do
                      text <- readFile arg
-                     return opt { optIncludeInHeader = text, 
+                     return opt { optIncludeInHeader = fromUTF8 text, 
                                   optStandalone = True })
                   "FILENAME")
                  "" -- "File to include at end of header (implies -s)"
@@ -238,7 +238,7 @@ options =
                  (ReqArg
                   (\arg opt -> do
                      text <- readFile arg
-                     return opt { optIncludeBeforeBody = text })
+                     return opt { optIncludeBeforeBody = fromUTF8 text })
                   "FILENAME")
                  "" -- "File to include before document body"
 
@@ -246,7 +246,7 @@ options =
                  (ReqArg
                   (\arg opt -> do
                      text <- readFile arg
-                     return opt { optIncludeAfterBody = text })
+                     return opt { optIncludeAfterBody = fromUTF8 text })
                   "FILENAME")
                  "" -- "File to include after document body"
 
@@ -254,7 +254,7 @@ options =
                  (ReqArg
                   (\arg opt -> do
                      text <- readFile arg
-                     return opt { optCustomHeader = text, 
+                     return opt { optCustomHeader = fromUTF8 text, 
                                   optStandalone = True })
                   "FILENAME")
                  "" -- "File to use for custom header (implies -s)"