✅ System.ArgumentException 'IBM437' is not a supported encoding name.
I wanted to compress my epub file via .Net with this tutorial https://products.aspose.com/zip/net/compress/epub/
I just copied and pasted its source code into my Rider and ran it. Then it gave me this error
`
The line the error points to is
`
But I only copied and pasted from the aspose website.
I tried this SO post https://stackoverflow.com/questions/25993251/ibm437-is-not-a-supported-encoding-name-from-zipfile-read-method
But the IBM437 error still appears. Does anyone know any workaround here?
Compress EPUB Files via .NET
C# compression source code to compress EPUB documents into a single zip archive or vice versa on .NET Framework, .NET Core.
Stack Overflow
'IBM437' is not a supported encoding name from ZipFile Read Method
I have a problem when my code execute this using:
using (ZipFile archive = ZipFile.Read(File)) //<== Crash Here!
{
foreach (ZipEntry entry in archive.Entries)
{
entry.Extract(
2 Replies
are you sure you did the SO post right, because that is the way you fix this problem
you need to add the latest version of
System.Text.Encoding.CodePages
on NuGet, and then call Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
before you call Save
Ahh ok no, I did not add the latest version of System.Text.Encoding.Codepages
I will try with the latest version again
Thank you so much for your response 🙂 I just found out that not calling before I call Save was the major culprit for the error 🙂 It works perfectly now