View Source Pop3mail.WordDecoder (pop3mail v1.5.0)
Decode words as defined in RFC 2047.
Summary
Functions
Decode a text with possibly encoded-words. Returns a list with tuples {charset, text}. Not encoded text is returned with us-ascii charset.
Decode a word. text with possibly encoded-words. Returns a list with tuples {charset, text}. Not encoded text is returned with us-ascii charset.
Decode a word with the given encoding.
Concat the text from the decoded list. Does NOT convert to a common character set like utf-8.
returns sorted unique list of charsets.
Functions
Decode a text with possibly encoded-words. Returns a list with tuples {charset, text}. Not encoded text is returned with us-ascii charset.
Decode a word. text with possibly encoded-words. Returns a list with tuples {charset, text}. Not encoded text is returned with us-ascii charset.
Decode a word with the given encoding.
encoding
- B/Q B=base64 encoded, Q=Quoted-printable
decoded_text_list_to_string(decoded_text_list, add_charset_name \\ false)
View SourceConcat the text from the decoded list. Does NOT convert to a common character set like utf-8.
decoded_text_list
- list with tuples {charset, text}.add_charset_name
- put the name of the charset after the decoded text parts (when it isn't us-ascii). A hint for the reader if a text contains multiple charsets.
returns sorted unique list of charsets.
Because the non-encoded text has the us-ascii charset (a subset of utf-8 iso-8859-1 cp1251) we are particulary interested in the other charsets.
decoded_text_list
- list with tuples {charset, text}.