You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After using zipFile.renameFiles to fix the garbled Chinese filenames in the compressed package, an error message appears during extraction stating "File header and local file header mismatch."
#543
Open
nonameShijian opened this issue
May 13, 2024
· 0 comments
I am using version 2.11.5 of net.lingala.zip4j:zip4j to unzip a ZIP file. This ZIP file was compressed using the WinRAR software on the Windows 10 system, so its default encoding should be GBK.
The fixGarbledFileNames method utilizes zipFile.renameFiles to correct the names of files with garbled Chinese characters to their proper form. However, after executing this, when I proceed with "zipFile.extractAll(filePath);" to extract the contents, an error arises: "File header and local file header mismatch."
Error Stack:
net.lingala.zip4j.exception.ZipException: File header and local file header mismatch
at net.lingala.zip4j.tasks.AbstractExtractFileTask.verifyNextEntry(AbstractExtractFileTask.java:173)
at net.lingala.zip4j.tasks.AbstractExtractFileTask.extractFile(AbstractExtractFileTask.java:54)
at net.lingala.zip4j.tasks.ExtractAllFilesTask.executeTask(ExtractAllFilesTask.java:41)
at net.lingala.zip4j.tasks.ExtractAllFilesTask.executeTask(ExtractAllFilesTask.java:17)
at net.lingala.zip4j.tasks.AsyncZipTask.performTaskWithErrorHandling(AsyncZipTask.java:51)
at net.lingala.zip4j.tasks.AsyncZipTask.access$400(AsyncZipTask.java:9)
at net.lingala.zip4j.tasks.AsyncZipTask$1.run(AsyncZipTask.java:36)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
The text was updated successfully, but these errors were encountered:
I am using version 2.11.5 of net.lingala.zip4j:zip4j to unzip a ZIP file. This ZIP file was compressed using the WinRAR software on the Windows 10 system, so its default encoding should be GBK.
Here is the code snippet I'm using:
The fixGarbledFileNames method utilizes zipFile.renameFiles to correct the names of files with garbled Chinese characters to their proper form. However, after executing this, when I proceed with "zipFile.extractAll(filePath);" to extract the contents, an error arises: "File header and local file header mismatch."
Error Stack:
The text was updated successfully, but these errors were encountered: