Commit 4c0562ca authored by Sebastian Graf's avatar Sebastian Graf

Set input encoding to UTF-8

parent 52e761b9
Pipeline #9667 passed with stage
in 6 minutes and 9 seconds
......@@ -29,7 +29,6 @@ data Normalise = NormalisePercent | NormaliseRatio | NormaliseNone
main :: IO ()
main = do
when (not (null cmdline_errors) || OptHelp `elem` flags) $
die (concat cmdline_errors ++ usage)
......@@ -76,10 +75,14 @@ main = do
parse_logs :: [String] -> IO [ResultTable]
parse_logs [] = do
-- GHC outputs unicode bullet glyphs in warning messages, so we have to
-- assume UTF-8
hSetEncoding stdin utf8
f <- hGetContents stdin
return [parse_log f]
parse_logs log_files =
mapM (\f -> do h <- openFile f ReadMode
hSetEncoding h utf8
c <- hGetContents h
return (parse_log c)) log_files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment