Browse Source

Улучшил определение кодировки

Book Pauk 5 years ago
parent
commit
7d59af54de
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/core/BookConverter/textUtils.js

+ 1 - 1
server/core/BookConverter/textUtils.js

@@ -74,7 +74,7 @@ function getEncoding(buf, returnAll) {
 
     if (returnAll)
         return sorted;
-    else if (sorted[0].c > 0)
+    else if (sorted[0].c > 0 && sorted[0].c > sorted[0].totalChecked/2)
         return sorted[0].codePage;
     else
         return 'ISO-8859-5';