summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/abstractmail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/abstractmail.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp
index 8ee112c..ed5c898 100644
--- a/kmicromail/libmailwrapper/abstractmail.cpp
+++ b/kmicromail/libmailwrapper/abstractmail.cpp
@@ -76,7 +76,6 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin
} else if (enc.lower()=="binary") {
mimetype = MAILMIME_MECHANISM_BINARY;
}
-
int err = mailmime_part_parse(text->Content(),text->Length(),&index,mimetype,
&result_text,&target_length);
@@ -95,11 +94,13 @@ QString AbstractMail::convert_String(const char*text)
int err = MAILIMF_NO_ERROR;
QString result(text);
-
+ //qDebug("convert_String %s ", text);
+ //err = mailmime_encoded_phrase_parse("iso-8859-1",
+ // text, strlen(text),&index, "iso-8859-1",&res);
err = mailmime_encoded_phrase_parse("iso-8859-1",
- text, strlen(text),&index, "iso-8859-1",&res);
+ text, strlen(text),&index, "utf-8",&res);
if (err == MAILIMF_NO_ERROR && res && strlen(res)) {
- result = QString(res);
+ result = QString::fromUtf8(res);
}
//qDebug("convert_String:%s ",result.latin1() );
if (res) free(res);