author | alwin <alwin> | 2003-12-18 14:23:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-18 14:23:15 (UTC) |
commit | 5cb08b0c69ffc7216405b552e17ff0541578bda0 (patch) (unidiff) | |
tree | 37ea5ec8747f82a90c068422fbb99662789380ec | |
parent | 51e56afac97c5254abfe76b65fd697a3e75e4bdd (diff) | |
download | opie-5cb08b0c69ffc7216405b552e17ff0541578bda0.zip opie-5cb08b0c69ffc7216405b552e17ff0541578bda0.tar.gz opie-5cb08b0c69ffc7216405b552e17ff0541578bda0.tar.bz2 |
ok. char-translation enabled again.
make sure to have the decode patch applied to libetpan!!!!
-rw-r--r-- | noncore/net/mail/abstractmail.cpp | 17 | ||||
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 6 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 17 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 6 |
4 files changed, 22 insertions, 24 deletions
diff --git a/noncore/net/mail/abstractmail.cpp b/noncore/net/mail/abstractmail.cpp index b7e5eaa..3d76c96 100644 --- a/noncore/net/mail/abstractmail.cpp +++ b/noncore/net/mail/abstractmail.cpp | |||
@@ -48,24 +48,21 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin | |||
48 | } | 48 | } |
49 | 49 | ||
50 | QString AbstractMail::convert_String(const char*text) | 50 | QString AbstractMail::convert_String(const char*text) |
51 | { | 51 | { |
52 | #if 0 | ||
53 | size_t index = 0; | 52 | size_t index = 0; |
54 | char*res = 0; | 53 | char*res = 0; |
55 | 54 | ||
56 | qDebug("encode start %s",text); | 55 | /* attention - doesn't work with arm systems! */ |
57 | /* attention - doesn't work with arm systems! */ | ||
58 | int err = mailmime_encoded_phrase_parse("iso-8859-1", | 56 | int err = mailmime_encoded_phrase_parse("iso-8859-1", |
59 | text, strlen(text),&index, "iso-8859-1",&res); | 57 | text, strlen(text),&index, "iso-8859-1",&res); |
60 | qDebug("encode end"); | ||
61 | if (err != MAILIMF_NO_ERROR) { | 58 | if (err != MAILIMF_NO_ERROR) { |
62 | if (res) free(res); | 59 | if (res) free(res); |
63 | return QString(text); | 60 | return QString(text); |
64 | } | 61 | } |
65 | QString result(res); | 62 | if (res) { |
66 | free(res); | 63 | QString result(res); |
67 | return result; | 64 | free(res); |
68 | #else | 65 | return result; |
69 | return QString(text); | 66 | } |
70 | #endif | 67 | return QString(text); |
71 | } | 68 | } |
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index 8a86c95..838300a 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp | |||
@@ -277,9 +277,10 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
277 | } | 277 | } |
278 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { | 278 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { |
279 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; | 279 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; |
280 | m->setDate(head->env_date); | 280 | m->setDate(head->env_date); |
281 | m->setSubject(head->env_subject); | 281 | m->setSubject(convert_String((const char*)head->env_subject)); |
282 | //m->setSubject(head->env_subject); | ||
282 | if (head->env_from!=NULL) { | 283 | if (head->env_from!=NULL) { |
283 | addresslist = address_list_to_stringlist(head->env_from->frm_list); | 284 | addresslist = address_list_to_stringlist(head->env_from->frm_list); |
284 | if (addresslist.count()) { | 285 | if (addresslist.count()) { |
285 | m->setFrom(addresslist.first()); | 286 | m->setFrom(addresslist.first()); |
@@ -433,9 +434,10 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
433 | from = ""; | 434 | from = ""; |
434 | named_from = false; | 435 | named_from = false; |
435 | current_address=(mailimap_address*)current->data; | 436 | current_address=(mailimap_address*)current->data; |
436 | if (current_address->ad_personal_name){ | 437 | if (current_address->ad_personal_name){ |
437 | from+=QString(current_address->ad_personal_name); | 438 | from+=convert_String((const char*)current_address->ad_personal_name); |
439 | //from+=QString(current_address->ad_personal_name); | ||
438 | from+=" "; | 440 | from+=" "; |
439 | named_from = true; | 441 | named_from = true; |
440 | } | 442 | } |
441 | if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) { | 443 | if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) { |
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index b7e5eaa..3d76c96 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -48,24 +48,21 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin | |||
48 | } | 48 | } |
49 | 49 | ||
50 | QString AbstractMail::convert_String(const char*text) | 50 | QString AbstractMail::convert_String(const char*text) |
51 | { | 51 | { |
52 | #if 0 | ||
53 | size_t index = 0; | 52 | size_t index = 0; |
54 | char*res = 0; | 53 | char*res = 0; |
55 | 54 | ||
56 | qDebug("encode start %s",text); | 55 | /* attention - doesn't work with arm systems! */ |
57 | /* attention - doesn't work with arm systems! */ | ||
58 | int err = mailmime_encoded_phrase_parse("iso-8859-1", | 56 | int err = mailmime_encoded_phrase_parse("iso-8859-1", |
59 | text, strlen(text),&index, "iso-8859-1",&res); | 57 | text, strlen(text),&index, "iso-8859-1",&res); |
60 | qDebug("encode end"); | ||
61 | if (err != MAILIMF_NO_ERROR) { | 58 | if (err != MAILIMF_NO_ERROR) { |
62 | if (res) free(res); | 59 | if (res) free(res); |
63 | return QString(text); | 60 | return QString(text); |
64 | } | 61 | } |
65 | QString result(res); | 62 | if (res) { |
66 | free(res); | 63 | QString result(res); |
67 | return result; | 64 | free(res); |
68 | #else | 65 | return result; |
69 | return QString(text); | 66 | } |
70 | #endif | 67 | return QString(text); |
71 | } | 68 | } |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 8a86c95..838300a 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -277,9 +277,10 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) | |||
277 | } | 277 | } |
278 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { | 278 | if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { |
279 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; | 279 | mailimap_envelope * head = item->att_data.att_static->att_data.att_env; |
280 | m->setDate(head->env_date); | 280 | m->setDate(head->env_date); |
281 | m->setSubject(head->env_subject); | 281 | m->setSubject(convert_String((const char*)head->env_subject)); |
282 | //m->setSubject(head->env_subject); | ||
282 | if (head->env_from!=NULL) { | 283 | if (head->env_from!=NULL) { |
283 | addresslist = address_list_to_stringlist(head->env_from->frm_list); | 284 | addresslist = address_list_to_stringlist(head->env_from->frm_list); |
284 | if (addresslist.count()) { | 285 | if (addresslist.count()) { |
285 | m->setFrom(addresslist.first()); | 286 | m->setFrom(addresslist.first()); |
@@ -433,9 +434,10 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
433 | from = ""; | 434 | from = ""; |
434 | named_from = false; | 435 | named_from = false; |
435 | current_address=(mailimap_address*)current->data; | 436 | current_address=(mailimap_address*)current->data; |
436 | if (current_address->ad_personal_name){ | 437 | if (current_address->ad_personal_name){ |
437 | from+=QString(current_address->ad_personal_name); | 438 | from+=convert_String((const char*)current_address->ad_personal_name); |
439 | //from+=QString(current_address->ad_personal_name); | ||
438 | from+=" "; | 440 | from+=" "; |
439 | named_from = true; | 441 | named_from = true; |
440 | } | 442 | } |
441 | if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) { | 443 | if (named_from && (current_address->ad_mailbox_name || current_address->ad_host_name)) { |