mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Since version 0.19 iOS zip open stream doesn't work #347
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?
Originally created by @ghost on GitHub (Apr 11, 2019).
The exception is raised on this line:
using (var archive = SharpCompress.Archives.Zip.ZipArchive.Open(fileStream))The strange thing is that if I catch the exception it is null, so I can't provide any other info...
The same code works on UWP in all versions of SharpCompress, but on iOS 0.18.2 is the last version that processes this line properly.
@adamhathcock commented on GitHub (Apr 12, 2019):
Can only guess it has something to do with .NET Standard 2.0 targetting. I don't use iOS (Xamarin?) so will need help.
here's the changelog for 0.19: https://github.com/adamhathcock/sharpcompress/releases/tag/0.19
@ghost commented on GitHub (Apr 12, 2019):
It works on Xamarin.Android, so it is isolated to Xamarin.iOS and I think Xamarin.Mac.
Surely I can help if it means that I should test some code report exceptions etc.
@ghost commented on GitHub (Jul 16, 2020):
I found the bug it is here:
This is causing System.NotSupportedException on iOS and macOS
Using any other encoding like UTF8 resolves this for me.
@adamhathcock can you fix the problem with this info?
@ghost commented on GitHub (Jul 16, 2020):
Also this means that this can work on iOS if you check 'west' in internationalization project properties, but it is unchecked by default.
@adamhathcock commented on GitHub (Jul 16, 2020):
I should probably just change it to be Encoding.Default because 437 is problematic and old. I think it was just the default for Zip files back in the day.
@adamhathcock commented on GitHub (Jul 26, 2020):
New release https://www.nuget.org/packages/sharpcompress/0.26.0 should fix this