mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Encoding 437 Data Could Not Be Found #318
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 @ooikengsiang on GitHub (Jul 18, 2018).
The latest v0.22.0 version in Nuget caused some problem when trying uncompress 7z file in Xamarin Android and iOS. It show exception: Encoding 437 Data Could Not Be Found
Reverting back to v0.21.1 solved the problem.
@adamhathcock commented on GitHub (Jul 21, 2018):
Are you using the netstandard 2 version?
@adamhathcock commented on GitHub (Jul 21, 2018):
Also, give the full stack trace? I just want to make sure why this is happening.
@adamhathcock commented on GitHub (Jul 21, 2018):
Also, Encoding 437 has to do with Zip files, not 7Zip files.
@adamhathcock commented on GitHub (Jul 21, 2018):
Probably the PR that changed this which was the netstandard1.0 build flag change: https://github.com/adamhathcock/sharpcompress/pull/385/files
@ooikengsiang commented on GitHub (Jul 21, 2018):
I direct target on Android / iOS project. I have attached a sample Android project here.
Note: It only happen on release mode, debug mode have no problem.
UncompressApp.zip
@adamhathcock commented on GitHub (Jul 21, 2018):
Give me the stacktrace for your project, please. I’m not going to set up the tooling to run it.
@ooikengsiang commented on GitHub (Jul 21, 2018):
Since I can't easy copy paste the stack trace on release mode, here are the screenshot of the stack trace, hope it can help.

@adamhathcock commented on GitHub (Jul 21, 2018):
Thanks, that’s perfect
@gblikas commented on GitHub (Mar 7, 2019):
@ooikengsiang I am not sure if this is the correct fix, but I was seeing the same problem while trying to use
Ionic.Zip.dll. My solution was to copy theI18N.*.dll's into theAssetsfolder. This solved it for Android and iOS. For some reason, it seems like Unity doesn't include some essential code page support in its Mobile build pipeline.@adamhathcock commented on GitHub (Mar 7, 2019):
Hopefully, that's a solution. This type of thing being cross-platform is horrendous to debug and fix.
@gblikas commented on GitHub (Mar 7, 2019):
@adamhathcock It always is, and especially with some many Android API levels, it can make it even worse!
Also, sorry if my quick fix doesn't work. I have just started using Unity.
@ooikengsiang commented on GitHub (Apr 28, 2019):
@gblikas Thanks for your suggestion, but my app did not use Unity. This problem can trigger through a simple Android app like the sample provided.
I haven't got the chance try the latest version of the library see if the problem still exist or not.
@Adit2705 commented on GitHub (Sep 9, 2019):
I had the same problem and has been driving me crazy. This affected both iOS and Android for me.
Under the Android project settings: Android Options -> Linker -> Check all Additional supported encodings.
iOS: Project Options -> iOS Build -> Advanced tab -> Internationalization -> Check all options.
@JamestsaiTW commented on GitHub (Apr 15, 2020):
I had the same problem in iOS, when I use nuget v0.22.0 of SharpCompress. I upgrade nuget to v0.25.0, this issue had been fixed. Please check it.
@gblikas commented on GitHub (Apr 15, 2020):
@JamestsaiTW Do you know what changed between that and previous version fix it, if it is indeed fixed?
@adamhathcock commented on GitHub (Apr 15, 2020):
I changed some of the targets which may have had an effect. Still no idea what would cause or fix the issue for iOS
@JamestsaiTW commented on GitHub (Apr 16, 2020):
I guess the "System.Text.Encoding.CodePages" library was changed from 4.5.0 to 4.7.0.
@ooikengsiang commented on GitHub (Apr 21, 2020):
Just tried version 0.25.0 on Android, still have the same exception :(
@adamhathcock commented on GitHub (Jul 11, 2020):
Having finally my own use case (Blazor WASM) I see that eager loading the encoding is an issue. Need to refactor to set different encodings.
Need to also remember why 437 was the default. I think it was zip spec.
@adamhathcock commented on GitHub (Jul 26, 2020):
New release https://www.nuget.org/packages/sharpcompress/0.26.0 should fix this