|
@@ -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.
|