简体   繁体   English

DotNetZip(Ionic.Zip.dll)不适用于压缩中文文件或文件夹名称

[英]DotNetZip (Ionic.Zip.dll) doesn't work with compress Chinese File or Folder name

It is very perfect condition when I use as following code to compress English file or folder name,However I do have got serious problem when the name change from English to Chinese name , it isn't work. 当我使用以下代码压缩英文文件或文件夹名称时,这是一个非常理想的条件,但是当名称从英文名称更改为中文名称时,我确实遇到了严重的问题,这是行不通的。
How can i do ???? 我能怎么做 ????

using (ZipFile zip = new ZipFile())
 {
   zip.AddDirectory(@"C:\inetpub\wwwroot\a");  // Zip folder included all branch files
   zip.Save(@"C:\inetpub\wwwroot\Projectzip.zip");//location and name for creating zip file
}

I've found answer to deal with my problem 我找到了解决我的问题的答案

using (ZipFile zip = new ZipFile(System.Text.Encoding.Default)) 使用(ZipFile zip = new ZipFile(System.Text.Encoding.Default))

thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM