From 9070f610ecfdf45e254ba2c56f554e5084376f91 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 2 Feb 2020 20:11:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt b/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt index 35c394251..2a21a0e5f 100644 --- a/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt @@ -29,8 +29,8 @@ object AnalyzeTxtFile { fun analyze(context: Context, book: Book): ArrayList { val bookFile = getBookFile(context, book) - val charset = charset(EncodingDetect.getEncode(bookFile)) - book.charset = charset.name() + book.charset = EncodingDetect.getEncode(bookFile) + val charset = book.getCharset() val toc = arrayListOf() //获取文件流 val bookStream = RandomAccessFile(bookFile, "r")