C#C
C#3y ago
morry329#

✅ 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
Unhandled exception. System.ArgumentException: 'IBM437' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')
   at System.Text.EncodingTable.InternalGetCodePageFromName(String name)
   at System.Text.EncodingTable.GetCodePageFromName(String name)
   at System.Text.Encoding.GetEncoding(String name)
   at Aspose.Zip.Archive.Save(Stream outputStream, ArchiveSaveOptions saveOptions)
   at Aspose.Zip.Archive.Save(String destinationFileName, ArchiveSaveOptions saveOptions)
   at Program.<Main>$(String[] args) in /Users/musterfrau/RiderProjects/CompressViaRider/CompressViaRider/Program.cs:line 12
`
The line the error points to is
arch.Save(dir+"archived_result.zip");
`
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?
C# compression source code to compress EPUB documents into a single zip archive or vice versa on .NET Framework, .NET Core.
Stack Overflow
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(
Was this page helpful?