io-streams-1.2.1.1: Simple, composable, and easy-to-use stream I/O

Safe HaskellNone
LanguageHaskell2010

System.IO.Streams.Text

Contents

Description

Stream primitives for decoding and encoding Text values in UTF-8 format.

Synopsis

Decoders and Encoders

decodeUtf8 :: InputStream ByteString -> IO (InputStream Text) Source

Decode an InputStream of ByteStrings in UTF-8 format into an InputStream of Text values. If decoding fails, will throw an exception. See Data.Text.Encoding.decodeUtf8.

decodeUtf8With :: OnDecodeError -> InputStream ByteString -> IO (InputStream Text) Source

Decode an InputStream of ByteStrings in UTF-8 format into an InputStream of Text values. If decoding fails, invokes the given OnDecodeError function to decide what to do. See Data.Text.Encoding.decodeUtf8With.

encodeUtf8 :: OutputStream ByteString -> IO (OutputStream Text) Source

Convert an OutputStream taking ByteStrings to an OutputStream that takes Text, encoding the data as UTF-8. See Data.Text.Encoding.encodeUtf8.