1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 10:19:33 +02:00

language detection for RTF's

This commit is contained in:
Nikolay Pultsin 2012-03-23 03:19:16 +00:00
parent eddccf34ec
commit 7aa4f39bc7
4 changed files with 27 additions and 22 deletions

View file

@ -73,7 +73,7 @@ void FormatPlugin::detectLanguage(Book &book, ZLInputStream &stream) {
const size_t size = stream.read(buffer, BUFSIZE);
stream.close();
shared_ptr<ZLLanguageDetector::LanguageInfo> info =
ZLLanguageDetector().findInfo(buffer, size);
ZLLanguageDetector().findInfoForEncoding(book.encoding(), buffer, size, -20000);
delete[] buffer;
if (!info.isNull()) {
if (!info->Language.empty()) {