'IBM437' is not a supported encoding name from ZipFile Read Method

后端 未结 1 1707
伪装坚强ぢ
伪装坚强ぢ 2021-02-13 11:23

I have a problem when my code execute this using:

using (ZipFile archive = ZipFile.Read(File))    //<== Crash Here!
{
    foreach (ZipEntry entry in archive.E         


        
相关标签:
1条回答
  • 2021-02-13 12:04

    In Visual Studio:

    1. Open Package Manager Console and type in Install-Package System.Text.Encoding.CodePages -Version 4.4.0. Change the version number appropriately.

    2. Add this line to your code: Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

    3. Attach the necessary directive if required.

    0 讨论(0)
提交回复
热议问题