text-0.6: An efficient packed Unicode text type

Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com, rtharper@aftereternity.co.uk, duncan@haskell.org

Data.Text.Lazy.Encoding

Contents

Description

Functions for converting lazy Text values to and from lazy ByteString, using several standard encodings.

To make use of a much larger variety of encodings, use the text-icu package.

Synopsis

Decoding ByteStrings to Text

decodeUtf8 :: ByteString -> TextSource

Decode a ByteString containing UTF-8 encoded text.

decodeUtf8With :: OnDecodeError -> ByteString -> TextSource

Decode a ByteString containing UTF-8 encoded text.

Encoding Text to ByteStrings

encodeUtf8 :: Text -> ByteStringSource

Encode text using UTF-8 encoding.