mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 05:01:52 +01:00
Specify charset for ZIP chapters when using Android N+ (fixes #905)
This commit is contained in:
parent
620be2617a
commit
e810b343cf
@ -1,10 +1,12 @@
|
||||
package eu.kanade.tachiyomi.ui.reader.loader
|
||||
|
||||
import android.os.Build
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.ui.reader.model.ReaderPage
|
||||
import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder
|
||||
import eu.kanade.tachiyomi.util.system.ImageUtil
|
||||
import java.io.File
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipFile
|
||||
import rx.Observable
|
||||
@ -17,7 +19,11 @@ class ZipPageLoader(file: File) : PageLoader() {
|
||||
/**
|
||||
* The zip file to load pages from.
|
||||
*/
|
||||
private val zip = ZipFile(file)
|
||||
private val zip = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
ZipFile(file, StandardCharsets.ISO_8859_1)
|
||||
} else {
|
||||
ZipFile(file)
|
||||
}
|
||||
|
||||
/**
|
||||
* Recycles this loader and the open zip.
|
||||
|
Loading…
Reference in New Issue
Block a user