mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #30] [MERGED] Fix ansi filename decoded as gibberish in zip file #794
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?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/30
Author: @larvata
Created: 12/24/2014
Status: ✅ Merged
Merged: 12/24/2014
Merged by: @adamhathcock
Base:
master← Head:fix-zip-ansi-filename📝 Commits (1)
0c36ff6Fix ansi filename decoded as gibberish in zip file📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
SharpCompress/Common/ArchiveEncoding.cs(+1 -1)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.