Search code examples
c#asp.netzip

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
}

Solution

  • I've found an answer to deal with my problem

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

    thanks