-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Support for reading and writing UTF8 Strings
--
-- A UTF8 layer for IO and Strings. The utf8-string package provides
-- operations for encoding UTF8 strings to Word8 lists and back, and for
-- reading and writing UTF8 without truncation.
@package utf8-string
@version 0.2
-- | Support for encoding UTF8 Strings to and from [Word8]
module Codec.Binary.UTF8.String
-- | Encode a Haskell String to a list of Word8 values, in UTF8 format.
encode :: String -> [Word8]
-- | Decode a UTF8 string packed into a list of Word8 values, directly to
-- String
decode :: [Word8] -> String
-- | Encode a string using encode and store the result in a
-- String.
encodeString :: String -> String
-- | Decode a string using decode using a String as input. |
-- This is not safe but it is necessary if UTF-8 encoded text | has been
-- loaded into a String prior to being decoded.
decodeString :: String -> String
-- | String IO preserving UTF8 encoding.
module System.IO.UTF8
-- | The print function outputs a value of any printable type to the
-- standard output device. This function differs from the System.IO.print
-- in that it preserves any UTF8 encoding of the shown value.
print :: (Show a) => a -> IO ()
-- | Write a UTF8 string to the standard output device
putStr :: String -> IO ()
-- | The same as putStr, but adds a newline character.
putStrLn :: String -> IO ()
-- | Read a UTF8 line from the standard input device
getLine :: IO String
-- | The readLn function combines getLine and
-- readIO, preserving UTF8
readLn :: (Read a) => IO a
-- | The readFile function reads a file and returns the contents of
-- the file as a UTF8 string. The file is read lazily, on demand, as with
-- getContents.
readFile :: FilePath -> IO String
-- | The computation writeFile file str function writes the
-- UTF8 string str, to the file file.
writeFile :: FilePath -> String -> IO ()
-- | The computation appendFile file str function appends
-- the UTF8 string str, to the file file.
appendFile :: FilePath -> String -> IO ()
-- | Lazily read stdin as a UTF8 string.
getContents :: IO String
-- | Read a UTF8 line from a Handle
hGetLine :: Handle -> IO String
-- | Lazily read a UTF8 string from a Handle
hGetContents :: Handle -> IO String
-- | Write a UTF8 string to a Handle.
hPutStr :: Handle -> String -> IO ()
-- | Write a UTF8 string to a Handle, appending a newline.
hPutStrLn :: Handle -> String -> IO ()