1

Closed

Incorrect decoding of the comment in ZipFile.Read() method.

description

Cyrillic characters in the comment of zip file that encoded in UTF-8 is not decoded properly when ZipFile.Read (string, Encoding) is called. I found a simple solution that solves this problem, but I think it's ugly. Eliminates this way. Some more code in my attach file:
        ZipFile zipfile = ZipFile.Read("zip.zip", Encoding.UTF8); // zip file saved with utf-8 encoding and cyrilic characters in the comment
        byte[] bytes = Encoding.GetEncoding(437).GetBytes(zipfile.Comment);
        textBox2.Text = Encoding.UTF8.GetString(bytes);
 
P.S. My OS is Windows 7 Ultimate 32bit.
P.P.S. Sorry for my English. I am from Russia and I use Google translator :)

file attachments

Closed Jun 14, 2011 at 1:49 PM by Cheeso
fixed in changeset 79101. First binary that will contain this change: v1.9.1.6

comments

Cheeso wrote Jun 14, 2011 at 1:45 PM

Thank you NikLeo, good report, and good simple test case illustrating the problem.