-
Notifications
You must be signed in to change notification settings - Fork 318
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
Add character set on ZipInputStream class? #64
Comments
I'm a little confused. Please feel free let me know if I'm wrong.
Why do we need a method to set the charset for |
@LeeYoung624 I think what Jack meant was the Charset to be used for filename and file comment for each LocalFileHeader. @jacktang According to zip specification, only two charsets are supported in a zip format - cp437 and utf8. This makes it easy for zip files to be handled among different tools/libraries/applications without knowing the source charset explicitly (zip headers do not store the charset, but only a flag wether it is utf8 or not). Zip4j was designed to support the default zip format expectations. However, there have been a lot of requests on this topic (most of them were for ZipFile api). I will analyse this and if feasible, will add this feature. |
@srikanth-lingala yes, the filename and comment depends on the correct character set. And appreciate your time! 🍺 |
* enable charset selection for ZipFile and InputStream * add test cases for charset specification in ZipFile and ZipInputStream * charset selection for ZipFile and ZipOutputStream enable charset selection for ZipFile(output APIs) and ZipOutputStream * add testcase for charset in ZipOutputStream * utf-8 bit flag should not be set when charset is specified * change the type of charset: from String to Charset * charset is not allowed to be null * Merge with master and adjust code * Minor cleanup
Feature added in v2.2.1 released today |
Hello,
How about add character set on
ZipInputStream
likejava.util.zip.ZipInputStream
so that we can handle other character set rather than only UTF8?The text was updated successfully, but these errors were encountered: