0 votes
by (200 points)
edited

I got a problem when try to zip folders with file names with national symbols (win-1251 encoding in my case). Archive contains unreadable file names. Seems like component using a wrong file names encoding. How can I manage this issue?

Thank you.

using (var zip = new Rebex.IO.Compression.ZipArchive(archiveFileName, ArchiveOpenMode.CreateNew))
{
  zip.Add(Path.Combine(srcPath, "*"), @"\", TraversalMode.Recursive,
                    TransferMethod.Copy,
                    ActionOnExistingFiles.OverwriteAll);
}
Applies to: Rebex ZIP

2 Answers

0 votes
by (200 points)
edited
 
Best answer

Seems like it's a Windows Explorer bug. Unzipped file has a correct file names.

Thank you and sorry for inconvenience.

alt text

by (62.7k points)
edited

Yes, Explorer's built-in zip utility cannot handle UTF-8 file names.

+1 vote
by (62.7k points)
edited

Can you please describe how the problem manifests?

I have tried your code to compress three files with Chinese, Czech and Russian characters in names and everything works fine (please see the image below).

compressed *.log files with UTF-8 names

I have Win7, NTFS (image shows how TotalCommander displays created zip file, also ZipArchive shows correct names).

...