mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #266] [MERGED] Force encoding #934
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/266
Author: @eklann
Created: 7/5/2017
Status: ✅ Merged
Merged: 7/5/2017
Merged by: @adamhathcock
Base:
master← Head:force-encoding📝 Commits (8)
2e95c23Fixing build880001aFixing build6976bdfFixing build4758857Fixed build (seems working now)7e979eaAdded support to force specific encoding when reading or writing an archiveece6b5fMerge branch 'master' into force-encodingcb7df02Minor fixed related to force encoding23b62dbRemoved obsolete project file not present in master📊 Changes
31 files changed (+467 additions, -387 deletions)
View changed files
📝
src/SharpCompress/Archives/GZip/GZipArchive.cs(+8 -6)📝
src/SharpCompress/Archives/Tar/TarArchive.cs(+5 -5)📝
src/SharpCompress/Archives/Zip/ZipArchive.cs(+16 -13)📝
src/SharpCompress/Common/GZip/GZipEntry.cs(+3 -2)📝
src/SharpCompress/Common/GZip/GZipFilePart.cs(+9 -6)📝
src/SharpCompress/Common/OptionsBase.cs(+5 -1)📝
src/SharpCompress/Common/Rar/Headers/FileHeader.cs(+37 -35)📝
src/SharpCompress/Common/Rar/Headers/RarHeader.cs(+9 -4)📝
src/SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs(+83 -81)📝
src/SharpCompress/Common/Tar/Headers/TarHeader.cs(+6 -5)📝
src/SharpCompress/Common/Tar/TarEntry.cs(+3 -2)📝
src/SharpCompress/Common/Tar/TarHeaderFactory.cs(+18 -13)📝
src/SharpCompress/Common/Zip/Headers/HeaderFlags.cs(+1 -0)📝
src/SharpCompress/Common/Zip/Headers/LocalEntryHeader.cs(+1 -0)📝
src/SharpCompress/Common/Zip/Headers/ZipFileEntry.cs(+15 -2)📝
src/SharpCompress/Common/Zip/SeekableZipHeaderFactory.cs(+4 -3)📝
src/SharpCompress/Common/Zip/StreamingZipHeaderFactory.cs(+3 -2)📝
src/SharpCompress/Common/Zip/ZipHeaderFactory.cs(+63 -54)📝
src/SharpCompress/Compressors/Deflate/DeflateStream.cs(+4 -2)📝
src/SharpCompress/Compressors/Deflate/GZipStream.cs(+11 -5)...and 11 more files
📄 Description
Added property ForceEncoding to OptionsBase, purpose is to be able to force reading from or writing to an archive to use the specified encoding.
The problem I am solving with this is the ability to unpack archives that has a non-standard encoding of the filenames. This is common for zip files.
The ArchiveEncoding.Default does not solve the problem, because of two reasons.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.