author | alwin <alwin> | 2003-12-16 02:13:09 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-16 02:13:09 (UTC) |
commit | f42c15f884d4377bc99d73e16fa1722b0fb2a4d3 (patch) (side-by-side diff) | |
tree | 0ecd625c8a5913285fa31a050a9a6e49c13fbe4b /noncore/net/mail/libmailwrapper/abstractmail.cpp | |
parent | 32d48372f7b5ec9e4586ea74cc444838b157248e (diff) | |
download | opie-f42c15f884d4377bc99d73e16fa1722b0fb2a4d3.zip opie-f42c15f884d4377bc99d73e16fa1722b0fb2a4d3.tar.gz opie-f42c15f884d4377bc99d73e16fa1722b0fb2a4d3.tar.bz2 |
quoted-printable text will be decoded for display
Diffstat (limited to 'noncore/net/mail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 7380c31..0bb2525 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp @@ -2,6 +2,10 @@ #include "imapwrapper.h" #include "pop3wrapper.h" +#include <qstring.h> +#include <stdlib.h> +#include <libetpan/mailmime_content.h> + AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) { return new IMAPwrapper(a); @@ -11,3 +15,20 @@ AbstractMail* AbstractMail::getWrapper(POP3account *a) { return new POP3wrapper(a); } + +QString AbstractMail::decode_quoted_printable(const char*text) +{ + char*result_text; + size_t index = 0; + QString result = ""; + /* reset for recursive use! */ + size_t target_length = 0; + result_text = 0; + int err = mailmime_quoted_printable_body_parse(text,strlen(text), + &index,&result_text,&target_length,0); + if (result_text) { + result = result_text; + free(result_text); + } + return result; +} |