Skip to content

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

Closed

Description

@EvilBeaver

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

Activity

  1. piksel commented on Oct 25, 2018

    @piksel
    Member

    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.

  2. added
    enhancement
    zip
    on Dec 19, 2018
  3. linked a pull request that will close this issuefeat(zip): better string encoding handling #592on Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantedzip

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions