@@ -46,7 +46,7 @@ import System.Console.GetOpt
4646import Data.Char ( toLower )
4747import Data.List ( intercalate, isPrefixOf )
4848import System.Directory ( getAppUserDataDirectory, doesFileExist, findExecutable )
49−import System.IO ( stdout, hPutStr, hPutStrLn )
49+import System.IO ( stdout )
5050import System.IO.Error ( isDoesNotExistError )
5151import qualified Control.Exception as E
5252import Control.Exception.Extensible ( throwIO )
@@ -312,7 +312,7 @@ options =
312312 (\arg _ -> do
313313 templ <- getDefaultTemplate Nothing arg
314314 case templ of
315− Right t -> hPutStr stdout t
315+ Right t -> UTF8.hPutStr stdout t
316316 Left e -> error $ show e
317317 exitWith ExitSuccess)
318318 "FORMAT")
@@ -663,7 +663,7 @@ options =
663663 (NoArg
664664 (\_ -> do
665665 prg <- getProgName
666− hPutStrLn stdout (prg ++ " " ++ pandocVersion ++ compileInfo ++
666+ UTF8.hPutStrLn stdout (prg ++ " " ++ pandocVersion ++ compileInfo ++
667667 copyrightMessage)
668668 exitWith ExitSuccess ))
669669 "" -- "Print version"
@@ -672,7 +672,7 @@ options =
672672 (NoArg
673673 (\_ -> do
674674 prg <- getProgName
675− hPutStr stdout (usageMessage prg options)
675+ UTF8.hPutStr stdout (usageMessage prg options)
676676 exitWith ExitSuccess ))
677677 "" -- "Show help"
678678
@@ -827,8 +827,8 @@ main = do
827827 } = opts
828828
829829 when dumpArgs $
830− do hPutStrLn stdout outputFile
831− mapM_ (\arg -> hPutStrLn stdout arg) args
830+ do UTF8.hPutStrLn stdout outputFile
831+ mapM_ (\arg -> UTF8.hPutStrLn stdout arg) args
832832 exitWith ExitSuccess
833833
834834 let sources = if ignoreArgs then [] else args
@@ -1026,8 +1026,8 @@ main = do
10261026 writeBinary = B.writeFile (UTF8.encodePath outputFile)
10271027
10281028 let writerFn :: FilePath -> String -> IO ()
1029− writerFn "-" = putStr
1030− writerFn f = writeFile f
1029+ writerFn "-" = UTF8.putStr
1030+ writerFn f = UTF8.writeFile f
10311031
10321032 case getWriter writerName' of
10331033 Left e -> err 9 e