I use ICSharpCode.SharpZipLib.dll for zip my software file. in file path exist some character contain other language like persian and after zipping file, that turn to ? character an this makes some problem as Illegal characters in path.

C:\Program Files\my software\?.zip

Now how can I fix it?

有帮助吗?

解决方案

Set the IsUnicodeText to true for each ZipEntry:

var newEntry = new ZipEntry(entryName)
            {
                DateTime = DateTime.Now,
                Size = content.Length,
                IsUnicodeText = true
            };
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top