修复txt的一些问题
This commit is contained in:
@@ -63,7 +63,7 @@ class TextFile(private val book: Book) {
|
||||
var blockContent: String
|
||||
var length = bis.read(buffer)
|
||||
if (book.charset.isNullOrBlank()) {
|
||||
book.charset = EncodingDetect.getEncode(buffer)
|
||||
book.charset = EncodingDetect.getEncode(buffer.copyOf(length))
|
||||
}
|
||||
charset = book.fileCharset()
|
||||
blockContent = String(buffer, 0, length, charset)
|
||||
|
||||
Reference in New Issue
Block a user