Frage

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?

War es hilfreich?

Lösung

Set the IsUnicodeText to true for each ZipEntry:

var newEntry = new ZipEntry(entryName)
            {
                DateTime = DateTime.Now,
                Size = content.Length,
                IsUnicodeText = true
            };
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top