Net C# 压缩包文件名乱码解决

1.Program.js

 

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

2.解压读取压缩包时

using Stream fileStream = file.OpenReadStream();
using ZipArchive archive = new ZipArchive(fileStream, ZipArchiveMode.Read, true, Encoding.GetEncoding("gbk"));

 

posted @ 2024-02-02 17:19  NavyW  阅读(152)  评论(0编辑  收藏  举报