This project is read-only.

With UseUnicodeAsNecessary, Problem opening a zip file with windows compressed folders

Jul 21, 2009 at 9:56 AM


I have a very strange problem,

I created a zip file that contains one constant file with a certain name,

then i changed the name of the file to Hebrew.

then saved it. Here is the code :

using (ZipFile zip = new ZipFile())
                ZipEntry ze = zip.AddFile("c:\\temp\\11.mp3", "");
                ze.UseUnicodeAsNecessary = true;
                ze.FileName = "אהלן אהלן.mp3";

the problem is when i try to open the file with windows compressed folders the name of the file becomes unclear (_נ_פ_£_ƒ _נ_פ_£_ƒ.mp3)

and when i open the file with WinRar, the name is fine.

I tried different Encodes and it doesn't seem to work...



Jul 21, 2009 at 1:19 PM
Edited Jul 22, 2009 at 3:07 PM

Are you saying that Windows Compressed Folders cannot correctly read the Zip file that uses Unicode encoding for the filenames? 

I think that is expected behavior.  The documentation for the UseUnicodeAsNecessary property discusses the issue with unicode and Windows Compressed folders. link

Zip files created with strict adherence to the PKWare specification with respect to UTF-8 encoding can contain entries with filenames containing any combination of Unicode characters, including the full range of characters from Chinese, Latin, Hebrew, Greek, Cyrillic, and many other alphabets. However, because at this time, the UTF-8 portion of the PKWare specification is not broadly supported by other zip libraries and utilities, such zip files may not be readable by your favorite zip tool or archiver. In other words, interoperability will decrease if you set this flag to true.

In particular, Zip files created with strict adherence to the PKWare specification with respect to UTF-8 encoding will not work well with Explorer in Windows XP or Windows Vista, because Windows compressed folders, as far as I know, do not support UTF-8 in zip files. Vista can read the zip files, but shows the filenames incorrectly. Unpacking from Windows Vista Explorer will result in filenames that have rubbish characters in place of the high-order UTF-8 bytes.

I'm not sure if the Windows Compressed Folders can handle any arbitrary encoding - in other words a non-unicode code page, like D)S-862 or Windows-1255. 

Jul 22, 2009 at 8:30 AM
Edited Jul 22, 2009 at 8:50 AM

just like you wrote


10x for your help !



Jan 27, 2015 at 7:53 AM

Did you ever find a solution for hebrew names into the zip file?