문제

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