Portability | portable |
---|---|
Stability | experimental |
Maintainer | bos@serpentine.com, rtharper@aftereternity.co.uk, duncan@haskell.org |
Data.Text.Lazy.Encoding
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.
- decodeUtf8 :: ByteString -> Text
- decodeUtf8With :: OnDecodeError -> ByteString -> Text
- encodeUtf8 :: Text -> ByteString
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.