text-utf7-0.1.0.0: UTF-7 encoding/decoding for Data.Text

Safe HaskellNone
LanguageHaskell2010

Data.Text.Encoding.UTF7.IMAP

Synopsis

Documentation

decodeUtf7 :: ByteString -> Text Source

Decode a ByteString containing UTF-7 encoded text that is known to be valid.

If the input contains any invalid UTF-7 data, an exception will be thrown that cannot be caught in pure code. For more control over the handling of invalid data, use decodeUtf7' or decodeUtf7With.

decodeUtf7' :: ByteString -> Either UnicodeException Text Source

Decode a ByteString containing UTF-7 encoded text.

If the input contains any invalid UTF-7 data, the relevant exception will be returned, otherwise the decoded text.