完成本地书籍编码选择

pull/341/head
gedoor 4 years ago
parent f571b9d176
commit dcce2d864c
  1. 2
      app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt

@ -20,7 +20,9 @@ class AnalyzeTxtFile {
@Throws(Exception::class)
fun analyze(book: Book): ArrayList<BookChapter> {
val bookFile = getBookFile(book)
if (book.charset == null) {
book.charset = EncodingDetect.getEncode(bookFile)
}
charset = book.fileCharset()
val rulePattern = if (book.tocUrl.isNotEmpty()) {
Pattern.compile(book.tocUrl, Pattern.MULTILINE)

Loading…
Cancel
Save