RE: [PHP-CVS] com php-src: Expose missing flags from libzip at least >= 0.11.x: ext/zip/php_zip.c
| From: | Anatol Belski | Date: | Fri, 27 May 2016 10:42:38 +0000 |
| Subject: | RE: [PHP-CVS] com php-src: Expose missing flags from libzip at least >= 0.11.x: ext/zip/php_zip.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-92219@lists.php.net to get a copy of this message | ||
Hi Ferenc,
> -----Original Message-----
> From: Anatol Belski [mailto:ab@php.net]
> Sent: Wednesday, May 25, 2016 10:13 PM
> To: php-cvs@lists.php.net
> Subject: [PHP-CVS] com php-src: Expose missing flags from libzip at least >=
> 0.11.x: ext/zip/php_zip.c
>
> Commit: 893c2405ff34250ffefbbc1d223de4df6c154c8a
> Author: Anatol Belski <ab@php.net> Wed, 25 May 2016 22:10:24 +0200
> Parents: 38be3b28cb601f6015141eecfdb69bb5ce6c2b05
> Branches: master
>
> Link: http://git.php.net/?p=php-
> src.git;a=commitdiff;h=893c2405ff34250ffefbbc1d223de4df6c154c8a
>
> Log:
> Expose missing flags from libzip at least >= 0.11.x
>
> These are helpful with reading/writing zips containing non UTF-8 filenames to
> mitigate possibly changed libzip behaviors.
>
> Changed paths:
> M ext/zip/php_zip.c
>
>
> Diff:
> diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 7c9adf4..be35c2d 100644
> --- a/ext/zip/php_zip.c
> +++ b/ext/zip/php_zip.c
> @@ -3038,6 +3038,37 @@ static PHP_MINIT_FUNCTION(zip)
> REGISTER_ZIP_CLASS_CONST_LONG("FL_NODIR", ZIP_FL_NODIR);
> REGISTER_ZIP_CLASS_CONST_LONG("FL_COMPRESSED",
> ZIP_FL_COMPRESSED);
> REGISTER_ZIP_CLASS_CONST_LONG("FL_UNCHANGED",
> ZIP_FL_UNCHANGED);
> +#ifdef ZIP_FL_ENC_GUESS
> + /* Default filename encoding policy. */
> + REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_GUESS",
> ZIP_FL_ENC_GUESS);
> +#endif #ifdef ZIP_FL_ENC_RAW
> + REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_RAW",
> ZIP_FL_ENC_RAW); #endif
> +#ifdef ZIP_FL_ENC_STRICT
> + REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_STRICT",
> ZIP_FL_ENC_STRICT);
> +#endif #ifdef ZIP_FL_ENC_UTF_8
> + REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_UTF_8",
> ZIP_FL_ENC_UTF_8);
> +#endif #ifdef ZIP_FL_ENC_CP437
> + REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_CP437",
> ZIP_FL_ENC_CP437);
> +#endif
> +
Would you mind adding these constants to 5.6? This would help to workaround issues from https://bugs.php.net/bug.php?id=72258 .
Regards
Anatol