mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #30] Fix ansi filename decoded as gibberish in zip file #798
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/30
State: closed
Merged: Yes
I have noticed the same issue was created before DecodeString (in ZipFileEntry) fails to properly decode file path
The bug occurred on the zip file entry filename has non-ascii character and created by an archive manager which didn't support unicode entry filename.
According wiki Windows code page
If in an english windows the
Language for non-Unicode programswas set toChinese (Simplifed,RPC). The zip entry filename will be encoded with codepage 936(ANSI code pages),but sharpcompress decoded the filename with codepage 437(OEM code pages)In the other word, the codepage for entry filename encoding relays on ANSI code pages.