Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot extract zip files with filenames using extended ascii characters (ex: ä-char 132, Ü-char 154, and ü-char129) on Android Nougat #101

Open
andphillips opened this issue Jan 16, 2018 · 1 comment

Comments

@andphillips
Copy link

There is a bug when trying to extract a file that has a non-English ASCII character in the name starting with Android Nougat. According to Android's Charset, it only handles 7 bit ASCII (below). However, if the filename has 8 bit ASCII (chars 128-255) ExtractManager gets an exception due to the filename's character encoding and it will abort the Zip extraction.
https://developer.android.com/reference/java/nio/charset/Charset.html

It can be fixed by using the steps outlined in the post below in ExtractManager.extract(File,String) by setting the Charset in the ZipFile instantiation to "ISO-8859-1".
https://stackoverflow.com/questions/41908761/unzipping-a-file-with-special-characters-in-filenames-from-api24-upward

@andphillips
Copy link
Author

The files will also display with the wrong characters as well, but that is less of an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant