mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-09 09:05:41 +00:00
UTF8: use universalNewlineMode in reading.
This treats both '\r\n' and '\n' as '\n' on input, no matter what platform we're running on.
This commit is contained in:
@@ -75,7 +75,8 @@ hPutStrLn :: Handle -> String -> IO ()
|
||||
hPutStrLn h s = hSetEncoding h utf8 >> IO.hPutStrLn h s
|
||||
|
||||
hGetContents :: Handle -> IO String
|
||||
hGetContents h = hSetEncoding h utf8_bom >> IO.hGetContents h
|
||||
hGetContents h = hSetEncoding h utf8_bom >> hSetNewlineMode h universalNewlineMode
|
||||
>> IO.hGetContents h
|
||||
|
||||
encodePath :: FilePath -> FilePath
|
||||
decodeArg :: String -> String
|
||||
|
||||
Reference in New Issue
Block a user