Explorar el Código

Мелкая поправка

Book Pauk hace 6 años
padre
commit
92c454b3e9
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      server/core/BookConverter/textUtils.js

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

@@ -62,7 +62,10 @@ function getEncoding(buf) {
 
 
     sorted.sort((a, b) => b.c - a.c);
     sorted.sort((a, b) => b.c - a.c);
 
 
-    return sorted[0].codePage;
+    if (sorted[0].c > 0)
+        return sorted[0].codePage;
+    else
+        return 'ISO-8859-5';
 }
 }
 
 
 function checkIfText(buf) {
 function checkIfText(buf) {