From aab574f9ef78792e53bfc55aa58635ecaf8b2a90 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Thu, 31 Dec 2009 16:48:21 +0000 Subject: Use System.IO.UTF8 only if ghc < 6.12. GHC >= 6.12 (base >= 4.2) uses iconv to convert to unicode Strings. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1748 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/markdown2pdf.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/markdown2pdf.hs') diff --git a/src/markdown2pdf.hs b/src/markdown2pdf.hs index 815690f49..dc8421b28 100644 --- a/src/markdown2pdf.hs +++ b/src/markdown2pdf.hs @@ -9,8 +9,14 @@ import Control.Exception (tryJust, bracket) import System.IO (stderr) import System.IO.Error (isDoesNotExistError) import System.Environment ( getArgs, getProgName ) +-- Note: ghc >= 6.12 (base >=4.2) supports unicode through iconv +-- So we use System.IO.UTF8 only if we have an earlier version +#if MIN_VERSION_base(4,2,0) +#else import Prelude hiding ( putStr, putStrLn, writeFile, readFile, getContents ) import System.IO.UTF8 +#endif +import System.IO (hPutStrLn) import System.Exit (ExitCode (..), exitWith) import System.FilePath import System.Directory -- cgit v1.2.3