Text.Pandoc.UTF8

pandoc-3.7.0.2: Conversion between markup formats

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

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 Text
- getContents :: IO Text
- writeFileWith :: Newline -> FilePath -> Text -> IO ()
- writeFile :: FilePath -> Text -> IO ()
- putStrWith :: Newline -> Text -> IO ()
- putStr :: Text -> IO ()
- putStrLnWith :: Newline -> Text -> IO ()
- putStrLn :: Text -> IO ()
- hPutStrWith :: Newline -> Handle -> Text -> IO ()
- hPutStr :: Handle -> Text -> IO ()
- hPutStrLnWith :: Newline -> Handle -> Text -> IO ()
- hPutStrLn :: Handle -> Text -> IO ()
- hGetContents :: Handle -> IO Text
- toString :: ByteString -> String
- toText :: ByteString -> Text
- fromString :: String -> ByteString
- fromText :: Text -> ByteString
- toStringLazy :: ByteString -> String
- fromTextLazy :: Text -> ByteString
- toTextLazy :: ByteString -> Text
- fromStringLazy :: String -> ByteString
- encodePath :: FilePath -> FilePath
- decodeArg :: String -> String

# Documentation

readFile :: FilePath -> IO Text #

getContents :: IO Text #

writeFileWith :: Newline -> FilePath -> Text -> IO () #

writeFile :: FilePath -> Text -> IO () #

putStrWith :: Newline -> Text -> IO () #

putStr :: Text -> IO () #

putStrLnWith :: Newline -> Text -> IO () #

putStrLn :: Text -> IO () #

hPutStrWith :: Newline -> Handle -> Text -> IO () #

hPutStr :: Handle -> Text -> IO () #

hPutStrLnWith :: Newline -> Handle -> Text -> IO () #

hPutStrLn :: Handle -> Text -> IO () #

hGetContents :: Handle -> IO Text #

toString :: ByteString -> String #

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

toText :: ByteString -> Text #

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

fromString :: String -> ByteString #

fromText :: Text -> ByteString #

toStringLazy :: ByteString -> String #

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

fromTextLazy :: Text -> ByteString #

toTextLazy :: ByteString -> Text #

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

fromStringLazy :: String -> ByteString #

encodePath :: FilePath -> FilePath #

decodeArg :: String -> String #

Deprecated: decodeArg is now a no-op