Mercurial > libpst
comparison src/readpst.c @ 182:b65e8d0a088a
more cleanup on external names in the shared object file
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 13 Apr 2009 11:39:33 -0700 |
parents | 6954d315aaa8 |
children | 0a4f7ecd7452 |
comparison
equal
deleted
inserted
replaced
181:3b04745ff76d | 182:b65e8d0a088a |
---|---|
1052 // try to convert to the specified charset since the target | 1052 // try to convert to the specified charset since the target |
1053 // is not utf-8, and the data came from a unicode (utf16) field | 1053 // is not utf-8, and the data came from a unicode (utf16) field |
1054 // and is now in utf-8. | 1054 // and is now in utf-8. |
1055 size_t rc; | 1055 size_t rc; |
1056 DEBUG_EMAIL(("Convert %s utf-8 to %s\n", mime, charset)); | 1056 DEBUG_EMAIL(("Convert %s utf-8 to %s\n", mime, charset)); |
1057 vbuf *newer = pst_vballoc(2); | 1057 pst_vbuf *newer = pst_vballoc(2); |
1058 rc = pst_vb_utf8to8bit(newer, body->str, strlen(body->str), charset); | 1058 rc = pst_vb_utf8to8bit(newer, body->str, strlen(body->str), charset); |
1059 if (rc == (size_t)-1) { | 1059 if (rc == (size_t)-1) { |
1060 // unable to convert, change the charset to utf8 | 1060 // unable to convert, change the charset to utf8 |
1061 free(newer->b); | 1061 free(newer->b); |
1062 DEBUG_EMAIL(("Failed to convert %s utf-8 to %s\n", mime, charset)); | 1062 DEBUG_EMAIL(("Failed to convert %s utf-8 to %s\n", mime, charset)); |
1128 strncpy(sender, temp, sizeof(sender)); | 1128 strncpy(sender, temp, sizeof(sender)); |
1129 sender[sizeof(sender)-1] = '\0'; | 1129 sender[sizeof(sender)-1] = '\0'; |
1130 | 1130 |
1131 // convert the sent date if it exists, or set it to a fixed date | 1131 // convert the sent date if it exists, or set it to a fixed date |
1132 if (item->email->sent_date) { | 1132 if (item->email->sent_date) { |
1133 em_time = pst_fileTimeToUnixTime(item->email->sent_date, 0); | 1133 em_time = pst_fileTimeToUnixTime(item->email->sent_date); |
1134 c_time = ctime(&em_time); | 1134 c_time = ctime(&em_time); |
1135 if (c_time) | 1135 if (c_time) |
1136 c_time[strlen(c_time)-1] = '\0'; //remove end \n | 1136 c_time[strlen(c_time)-1] = '\0'; //remove end \n |
1137 else | 1137 else |
1138 c_time = "Fri Dec 28 12:06:21 2001"; | 1138 c_time = "Fri Dec 28 12:06:21 2001"; |