Skip to content

ZipStrings doesn't honor the CodePage property when it reads file entries #278

Description

@EvilBeaver

Non-unicode filenames are extracted incorrectly because of behavior of ZipStrings.EncodingFromFlag function.

ZipStrings.EncodingFromFlag always uses SystemDefaultCodepage when it's not a Unicode. Here should be just a CodePage, which can be adjusted from client-side code.

I can fix this and send a Pull Request, but what is release cycle? Whether project abandoned? Maybe I'd better make a fork and use it?

Problem line:

https://github.com/icsharpcode/SharpZipLib/blob/master/src/ICSharpCode.SharpZipLib/Zip/ZipStrings.cs#L128

Steps to reproduce

  1. Open non-unicode archive with ciryllic symbols
  2. Enumerate entries
  3. See that they are incorrect

Expected behavior

Symbols should be correct, when CodePage property is set to ciryllic one

Actual behavior

Symbols are incorrect, changing CodePage property doesn't help

Version of SharpZipLib

1.0

Obtained from (place an x between the brackets for all that apply)

  • Compiled from source
  • Package installed using:
    • NuGet

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions