conduit-0.5.0: Streaming data processing library.

Safe HaskellSafe-Infered

Data.Conduit.Text

Contents

Description

Handle streams of text.

Parts of this code were taken from enumerator and adapted for conduits.

Synopsis

Text codecs

data Codec Source

A specific character encoding.

Since 0.3.0

Instances

encode :: MonadThrow m => Codec -> GInfConduit Text m ByteStringSource

Convert text into bytes, using the provided codec. If the codec is not capable of representing an input character, an exception will be thrown.

Since 0.3.0

decode :: MonadThrow m => Codec -> GInfConduit ByteString m TextSource

Convert bytes into text, using the provided codec. If the codec is not capable of decoding an input byte sequence, an exception will be thrown.

Since 0.3.0

utf8 :: CodecSource

Since 0.3.0

utf16_le :: CodecSource

Since 0.3.0

utf16_be :: CodecSource

Since 0.3.0

utf32_le :: CodecSource

Since 0.3.0

utf32_be :: CodecSource

Since 0.3.0

ascii :: CodecSource

Since 0.3.0

iso8859_1 :: CodecSource

Since 0.3.0

lines :: Monad m => GInfConduit Text m TextSource

Emit each line separately

Since 0.4.1