mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-08 05:27:04 +00:00
[PR #363] [MERGED] ZipArchive Reader: Uses IBM PC character encoding to decode filename … #987
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/363
Author: @sridhar6668
Created: 3/27/2018
Status: ✅ Merged
Merged: 5/5/2018
Merged by: @adamhathcock
Base:
master← Head:sridhar6668/support_extended_ascii📝 Commits (7)
04ba6c2ZipArchive Reader: Uses IBM PC character encoding to decode filename and comment if the general purpose bit 11 is not set in the header5d8728dDecode without setting the default Encoding type1ea7bb5Merge branch 'master' into sridhar6668/support_extended_ascii91d753cMerge branch 'master' into sridhar6668/support_extended_asciiabddabfProper fixes for all platforms501407cChange flag name to be closer to spec2fb31d4Merge branch 'master' into sridhar6668/support_extended_ascii📊 Changes
8 files changed (+3552 additions, -9 deletions)
View changed files
➕
reference/APPNOTE.TXT(+3497 -0)📝
src/SharpCompress/Common/ArchiveEncoding.cs(+17 -0)📝
src/SharpCompress/Common/Zip/Headers/DirectoryEntryHeader.cs(+16 -4)📝
src/SharpCompress/Common/Zip/Headers/HeaderFlags.cs(+2 -1)📝
src/SharpCompress/Common/Zip/Headers/LocalEntryHeader.cs(+11 -1)📝
src/SharpCompress/SharpCompress.csproj(+7 -1)📝
src/SharpCompress/Writers/Zip/ZipCentralDirectoryEntry.cs(+1 -1)📝
src/SharpCompress/Writers/Zip/ZipWriter.cs(+1 -1)📄 Description
According to the zip file format specification, if general purpose bit 11 is unset, the file name and comment should conform to the original ZIP character encoding(IBM PC character encoding set, commonly referred to as IBM Code Page 437.). If general purpose bit 11 is set, the filename and comment must support UTF8.
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT . Heading - Language Encoding
Currently, the library always uses UTF8 to decode names. This pull request will use IBM PC character encoding if the UTF8 flag is not set in the header
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.