Skip to content

ZipStrings is static. Can't use different encodings for different zip files #279

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

Closed
EvilBeaver opened this issue Oct 25, 2018 · 1 comment · Fixed by #592
Closed

ZipStrings is static. Can't use different encodings for different zip files #279

EvilBeaver opened this issue Oct 25, 2018 · 1 comment · Fixed by #592
Labels
enhancement Feature request or other improvements of existing functionality help wanted zip Related to ZIP file format

Comments

@EvilBeaver
Copy link
Contributor

EvilBeaver commented Oct 25, 2018

This is proposal.

Today, ZipStrings class is static and encoding properties are static. This means I can't use different encodings for different ZipFile instances. In a multithreading environment it's very hard to use value that was set globally somewhere.

Proposal

use instance-wide encoding for a ZipFile class. Encoding must be an instance property of a ZipFile, not a global one.

Expected behavior

  • It's possible to have 2 instances of ZipFile which can read 2 files with different encodings inside.
  • Static dependency from ZipStrings.CodePage is removed
@piksel
Copy link
Member

piksel commented Oct 25, 2018

A different PR would be better, this might be a larger overhaul with additional tests etc.

I totally agree and am not found of the static ZipStrings approach for the above reasons.

@piksel piksel added enhancement Feature request or other improvements of existing functionality zip Related to ZIP file format help wanted labels Dec 19, 2018
@piksel piksel linked a pull request Mar 14, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or other improvements of existing functionality help wanted zip Related to ZIP file format
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants