Text.Pandoc.UTF8

pandoc-1.16.0.2: Conversion between markup formats

Copyright | Copyright (C) 2010-2015 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley.edu>
Stability | alpha
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Text.Pandoc.UTF8

Description

UTF-8 aware string IO functions that will work with GHC 6.10, 6.12, or 7.

Synopsis

- readFile :: FilePath -> IO String
- writeFile :: FilePath -> String -> IO ()
- getContents :: IO String
- putStr :: String -> IO ()
- putStrLn :: String -> IO ()
- hPutStr :: Handle -> String -> IO ()
- hPutStrLn :: Handle -> String -> IO ()
- hGetContents :: Handle -> IO String
- toString :: ByteString -> String
- fromString :: String -> ByteString
- toStringLazy :: ByteString -> String
- fromStringLazy :: String -> ByteString
- encodePath :: FilePath -> FilePath
- decodeArg :: String -> String

# Documentation

readFile :: FilePath -> IO String

writeFile :: FilePath -> String -> IO ()

getContents :: IO String

putStr :: String -> IO ()

putStrLn :: String -> IO ()

hPutStr :: Handle -> String -> IO ()

hPutStrLn :: Handle -> String -> IO ()

hGetContents :: Handle -> IO String

toString :: ByteString -> String

Convert UTF8-encoded ByteString to String, also removing '\r' characters.

fromString :: String -> ByteString

toStringLazy :: ByteString -> String

Convert UTF8-encoded ByteString to String, also removing '\r' characters.

fromStringLazy :: String -> ByteString

encodePath :: FilePath -> FilePath

decodeArg :: String -> String