From ed4b00399778204bc589135e005620c40c988258 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 3 Aug 2008 08:43:28 +0000 Subject: Added 'utf8' configuration flag to pandoc.cabal. This makes it possible to compile pandoc without utf8, using '-f-utf8' at configuration time. Utf-8 support is still the default. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1373 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/ODT.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Text/Pandoc') diff --git a/Text/Pandoc/ODT.hs b/Text/Pandoc/ODT.hs index 08ecf7d06..b44cb303f 100644 --- a/Text/Pandoc/ODT.hs +++ b/Text/Pandoc/ODT.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TemplateHaskell, CPP #-} {- Copyright (C) 2008 John MacFarlane @@ -32,9 +32,6 @@ module Text.Pandoc.ODT ( saveOpenDocumentAsODT ) where import Text.Pandoc.TH ( binaryContentsOf ) import Data.Maybe ( fromJust ) import Data.List ( partition, intersperse ) -import Prelude hiding ( writeFile, readFile, getContents ) -import System.IO.UTF8 -import System.IO ( stderr ) import System.Directory import System.FilePath ( (), takeDirectory, takeFileName, splitDirectories ) import System.Process ( runProcess, waitForProcess ) @@ -45,6 +42,13 @@ import Text.Pandoc.Shared ( withTempDir ) import Network.URI ( isURI ) import qualified Data.ByteString as B ( writeFile, pack ) import Data.ByteString.Internal ( c2w ) +import Prelude hiding ( writeFile, readFile ) +#ifdef UTF_8 +import System.IO.UTF8 +import System.IO ( stderr ) +#else +import System.IO +#endif -- | Produce an ODT file from OpenDocument XML. saveOpenDocumentAsODT :: FilePath -- ^ Pathname of ODT file to be produced. -- cgit v1.2.3