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:
parent
eddccf34ec
commit
7aa4f39bc7
4 changed files with 27 additions and 22 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue