php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51929
Patch fix_zip_unicode revision 2011-02-23 17:02 UTC by asaf at lingnu dot com

Patch fix_zip_unicode for Zip Related Bug #51929

Patch version 2011-02-23 17:02 UTC

Return to Bug #51929 | Download this patch
Patch Revisions:

Developer: asaf@lingnu.com

diff -uNr php-5.3.5/ext/zip/lib/zip_close.c php-5.3.5_zip_unicode_patch/ext/zip/lib/zip_close.c
--- php-5.3.5/ext/zip/lib/zip_close.c	2010-02-01 22:56:03.000000000 +0200
+++ php-5.3.5_zip_unicode_patch/ext/zip/lib/zip_close.c	2011-02-23 18:59:42.976393230 +0200
@@ -208,6 +208,8 @@
 	    cd->entry[j].bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR;
 		}
 	}
+	de.bitflags |= ZIP_GPBF_UTF8;
+       cd->entry[j].bitflags |= ZIP_GPBF_UTF8;
 
 	if (za->entry[i].ch_filename) {
 	    free(de.filename);
diff -uNr php-5.3.5/ext/zip/lib/zipint.h php-5.3.5_zip_unicode_patch/ext/zip/lib/zipint.h
--- php-5.3.5/ext/zip/lib/zipint.h	2010-02-01 23:20:07.000000000 +0200
+++ php-5.3.5_zip_unicode_patch/ext/zip/lib/zipint.h	2011-02-23 18:58:38.886391024 +0200
@@ -95,6 +95,7 @@
 #define ZIP_GPBF_ENCRYPTED		0x0001	/* is encrypted */
 #define ZIP_GPBF_DATA_DESCRIPTOR	0x0008	/* crc/size after file data */
 #define ZIP_GPBF_STRONG_ENCRYPTION	0x0040  /* uses strong encryption */
+#define ZIP_GPBF_UTF8	0x0080  /* uses utf-8 for filnames/comments*/
 
 /* error information */
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 21:01:29 2024 UTC