Encoding 437 Data Could Not Be Found #318

Closed
opened 2026-01-29 22:10:01 +00:00 by claunia · 20 comments
Owner

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.

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.
claunia added the bug label 2026-01-29 22:10:01 +00:00
Author
Owner

@adamhathcock commented on GitHub (Jul 21, 2018):

Are you using the netstandard 2 version?

@adamhathcock commented on GitHub (Jul 21, 2018): Are you using the netstandard 2 version?
Author
Owner

@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, give the full stack trace? I just want to make sure why this is happening.
Author
Owner

@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): Also, Encoding 437 has to do with Zip files, not 7Zip files.
Author
Owner

@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

@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
Author
Owner

@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

@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](https://github.com/adamhathcock/sharpcompress/files/2216047/UncompressApp.zip)
Author
Owner

@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.

@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.
Author
Owner

@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.
sharpcompressencodingerror

@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. ![sharpcompressencodingerror](https://user-images.githubusercontent.com/19687809/43034578-85c5e014-8d11-11e8-92a2-467f28010d95.PNG)
Author
Owner

@adamhathcock commented on GitHub (Jul 21, 2018):

Thanks, that’s perfect

@adamhathcock commented on GitHub (Jul 21, 2018): Thanks, that’s perfect
Author
Owner

@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 the I18N.*.dll's into the Assets folder. 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.

@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 the `I18N.*.dll`'s into the `Assets` folder. 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.
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Author
Owner

@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?

@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?
Author
Owner

@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

@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
Author
Owner

@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.

@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.
Author
Owner

@ooikengsiang commented on GitHub (Apr 21, 2020):

Just tried version 0.25.0 on Android, still have the same exception :(

@ooikengsiang commented on GitHub (Apr 21, 2020): Just tried version 0.25.0 on Android, still have the same exception :(
Author
Owner

@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 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.
Author
Owner

@adamhathcock commented on GitHub (Jul 26, 2020):

New release https://www.nuget.org/packages/sharpcompress/0.26.0 should fix this

@adamhathcock commented on GitHub (Jul 26, 2020): New release https://www.nuget.org/packages/sharpcompress/0.26.0 should fix this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#318