emailparse-0.2.0.8: An email parser that will parse everything

Safe HaskellNone
LanguageHaskell2010

Network.Mail.Parse.Decoders.BodyDecoder

Synopsis

Documentation

transferDecode :: ByteString -> Text -> Either (ByteString, ByteString) ByteString Source #

Remove transfer encoding from a string of bytes

encodingToUtf :: ByteString -> Text -> Text Source #

Transform a string of bytes with a given encoding into a UTF-8 string of bytes

decodeBody :: [Header] -> ByteString -> ByteString Source #

Reverse content transfer encoding applied to the body.

decodeTextBody :: [Header] -> ByteString -> Text Source #

Given a set of headers it tries to figure out the transfer encoding and charset and normalizes the contents into an UTF-8 encoded Text.

It will recover from errors, wherever possible