mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Specify charset for ZIP chapters when using Android N+ (fixes #905)
(cherry picked from commit e810b343cf)
			
			
This commit is contained in:
		| @@ -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. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user