with-utf8-1.0.2.1: Get your IO right on the first try

Safe HaskellSafe
LanguageHaskell2010

Data.Text.Lazy.IO.Utf8

Description

Data.Text.Lazy.IO for the modern world.

Wrappers around simple file reading/writing functions from the text package that reset the handle encoding to UTF-8.

Synopsis

Documentation

readFile :: MonadIO m => FilePath -> m Text Source #

Like readFile, but assumes the file is encoded in UTF-8, regardless of the current locale.

writeFile :: (MonadIO m, MonadMask m) => FilePath -> Text -> m () Source #

Like writeFile, but encodes the data in UTF-8, regardless of the current locale.