mh_mail: use truncate_to_word to avoid cutting an utf8 char. rcldb: logdeb text_to_word errors

This commit is contained in:
dockes
2009-11-18 10:26:47 +00:00
parent f5637445d6
commit dd6acb07cc
2 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -169,7 +169,8 @@ bool MimeHandlerMail::next_document()
m_metaData[cstr_mimetype].c_str()));
const string& txt = m_metaData[cstr_content];
if (m_startoftext < txt.size())
m_metaData[cstr_abstract] = txt.substr(m_startoftext, 250);
m_metaData[cstr_abstract] =
truncate_to_word(txt.substr(m_startoftext), 250);
} else {
m_metaData[cstr_abstract] = "";
res = processAttach();