I'm using Ionic.zip to zip a bunch of files. This is my code to add those file into the zip.
ZipFile zip = new ZipFile();
foreach (string filepath in listoffile) //5 files
{
zip.AddFile(filepath, "");
}
zip.Save(mypath + "attachment.zip");
When I check the number of file in the zip it show 5, but when I open the zip file it only have 4 files inside and missing the file that contain chinese character in the filename. I try multiple time and different file, the missing of file only happen when the file contain chinese character in it. Is there anyway that I can do to solve this problem?
This looks to be a bug or limitation in ionic-zip, which may be best addressed by logging an issue with wherever you got it from; however, a workaround might be: don't use that - the following works fine with the inbuilt .NET types (on some frameworks you might need to add a package reference to
System.IO.Compression). It is a bit more manual, but: it works.