SharpZipLib:1 不是受支持的代码页

SharpZipLib: 1 is not a supported code page

我使用 SharpZipLib 压缩文件,用户收到此错误:

1 is not a supported code page

我发现 here 问题出在区域设置中,解决方案在

"replace the line of code that fetches the code page from the Thread's OEMCodePage and instead hardcode the suitable value."

但是我没有找到任何代码示例来解决这个问题。

硬编码代码页下方的行以避免从系统区域设置中获取它:

ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 437;