Chromium Code Reviews| Index: third_party/zlib/google/zip.cc |
| diff --git a/third_party/zlib/google/zip.cc b/third_party/zlib/google/zip.cc |
| index 64aead1d64a1edfae35e9d21acb8025c97b151e4..b7631414e15bd14a98b1117603e2efcecd8997a2 100644 |
| --- a/third_party/zlib/google/zip.cc |
| +++ b/third_party/zlib/google/zip.cc |
| @@ -61,11 +61,17 @@ bool AddEntryToZip(zipFile zip_file, const base::FilePath& path, |
| if (is_directory) |
| str_path += "/"; |
| - if (ZIP_OK != zipOpenNewFileInZip( |
| + // Section 4.4.4 http://www.pkware.com/documents/casestudies/APPNOTE.TXT |
| + // Setting the Language encoding flag so the file is told to be in utf-8. |
| + const unsigned long LANGUAGE_ENCODING_FLAG = 0x1 << 11; |
| + |
| + if (ZIP_OK != zipOpenNewFileInZip4( |
| zip_file, str_path.c_str(), |
| NULL, NULL, 0u, NULL, 0u, NULL, // file info, extrafield local, length, |
| // extrafield global, length, comment |
| - Z_DEFLATED, Z_DEFAULT_COMPRESSION)) { |
| + Z_DEFLATED, Z_DEFAULT_COMPRESSION, 0, |
| + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, |
| + NULL, 0, 0, LANGUAGE_ENCODING_FLAG)) { |
|
satorux1
2013/12/05 09:35:23
NULL, 0, 0 look cryptic. could you add some commen
|
| DLOG(ERROR) << "Could not open zip file entry " << str_path; |
| return false; |
| } |