"IBM437" is not a supported encoding name from the ZipFile read method

I have a problem when my code executes this with:

using (ZipFile archive = ZipFile.Read(File))    //<== Crash Here!
{
    foreach (ZipEntry entry in archive.Entries)
    {
        entry.Extract(UnZipFolder.Name.ToString(), ExtractExistingFileAction.OverwriteSilently);   
    }
}

Failure when ZipFile tries to read my file, that it is a line and contains, sincrofit.zip, then crash and throw this exception:

'System.ArgumentException' Additional information: "IBM437" is not a supported encoding name.

+4
source share
1 answer

In Visual Studio: 1. Open the Package Manager console and type Install-Package System.Text.Encoding.CodePages -Version 4.4.0 . Change the version number accordingly.

  1. : Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); .
+1

All Articles