+ better fix the the multibyte character issue.

This commit is contained in:
kelson42 2011-03-24 07:24:23 +00:00
parent 939155a9cb
commit bd5205688a
1 changed files with 2 additions and 0 deletions

View File

@ -134,6 +134,8 @@ namespace kiwix {
/* snippet */
std::string snippet = std::string(this->htmlParser.dump, 0, 300);
std::string::size_type last = snippet.find_last_of('.');
if (last != snippet.npos)
last = snippet.find_last_of(' ');
if (last != snippet.npos)
snippet = snippet.substr(0, last+1);