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

标签 c# .net zip sharpziplib

我使用 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;

关于c# - SharpZipLib:1 不是受支持的代码页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46950386/

相关文章:

c# - 解析具有动态列数的大型分隔文件

c# - 如何从 javascript 访问数组列表、字符串数组或列表?

python - 如何使用 Python 2.4 解压缩文件?

c# - 将 zip 文件编码为 Base64

c# - 如何手动清除 ObjectDataSource 缓存

python - 如何在 Python 中读取压缩文件夹中的文本文件

c# - 将小 C# "Random String"函数转换为 Haskell 时遇到问题

c# - SlidingExpiration 和 MemoryCache

c# - 如何在 WPF 中从 UTF-8 字符串编码为\解码?

.net - 在所有异步套接字回调上强制线程CultureInfo