修复txt的一些问题

pull/1649/head
kunfei 3 years ago
parent 0e8a669c86
commit 6fe7cb7f63
  1. 2
      app/src/main/java/io/legado/app/model/localBook/TextFile.kt

@ -63,7 +63,7 @@ class TextFile(private val book: Book) {
var blockContent: String var blockContent: String
var length = bis.read(buffer) var length = bis.read(buffer)
if (book.charset.isNullOrBlank()) { if (book.charset.isNullOrBlank()) {
book.charset = EncodingDetect.getEncode(buffer) book.charset = EncodingDetect.getEncode(buffer.copyOf(length))
} }
charset = book.fileCharset() charset = book.fileCharset()
blockContent = String(buffer, 0, length, charset) blockContent = String(buffer, 0, length, charset)

Loading…
Cancel
Save