Repository navigation
Add support for the language encoding flag - #1
Merged
pmqs merged 1 commit intoMar 8, 2019
Merged
Conversation
This allows to set the flag when creating a zip file, and to get back the value of the flag when reading a zip file. It doesn't do any encoding or decoding of the name and comment fields. This is also a very partial revert of 02889ff where the support for the language encoding flag was commented out in IO::Compress::Zip.
Owner
|
Hey Manfred Thanks for the patch. This feature has been on my todo list for a very long time. From memory, the primary reason support was removed was because there are a couple of ways to store a UTF8 filename/comment in a zip file. At the time I hadn't decided which method to use. The one used here is the most common, but I pulled support until I bottomed out on that analysis. In principle I'm ok with (finally) enabling this feature, but I need to take another quick look at the zip specs before I reinstate the change There are a few changes I'll need to make before this can be released into the wild
|
Owner
ReferencesAPPNOTE.TXT, APPENDIX D - Language Encoding (EFS) |
p5p
pushed a commit
to Perl/perl5
that referenced
this pull request
Jun 3, 2019
[DELTA]
2.086 31 March 2019
* IO::Compress::Zip & IO::Uncompress::Unzip
Added support for Language Encoding Flag via the EFS option.
Starting point was pull request pmqs/IO-Compress#1
* zipdetails - some support for MVS (Z390) zip files
* IO::Uncompress::Base
Issue with trailing data after zip archive
#128626 for IO-Compress: mainframe zip archive
* t/cz-14gzopen.t
cperl error found in http://www.cpantesters.org/cpan/report/448cafc4-3108-11e9-9b6b-d3d33d7b1231
Perl has this: "Not enough arguments for Compress::Zlib::gzopen"
cperl uses this: "Not enough arguments for subroutine entry Compress::Zlib::gzopen"
* Handlers being called when optional modules are not installed
#128538: $SIG{__DIE__}
* #128194: Beef up diag when system returns error
* Moved source to github https://github.com/pmqs/IO-Compress
* Add META_MERGE to Makefile.PL
* Added meta-json.t & meta-yaml.t
Merged
vlmarek
added a commit
to vlmarek/IO-Compress
that referenced
this pull request
Jun 11, 2026
The eval-removal change used a single-quoted negative lookbehind
containing ${BEGIN_DELIM}. That made the regex treat the characters in the
literal string "${BEGIN_DELIM}" as excluded preceding characters, so output
patterns such as B#1.out or IMG#1.out did not expand pmqs#1.
Escaped literal # and * are already protected with HASH_ESC and STAR_ESC
before wildcard references are converted to internal markers, so the
lookbehind is not needed. Replace exact internal marker sequences directly
when generating output filenames.
Add a regression test for expanding pmqs#1 after an ordinary letter.
pmqs
pushed a commit
that referenced
this pull request
Jun 13, 2026
The eval-removal change used a single-quoted negative lookbehind
containing ${BEGIN_DELIM}. That made the regex treat the characters in the
literal string "${BEGIN_DELIM}" as excluded preceding characters, so output
patterns such as B#1.out or IMG#1.out did not expand #1.
Escaped literal # and * are already protected with HASH_ESC and STAR_ESC
before wildcard references are converted to internal markers, so the
lookbehind is not needed. Replace exact internal marker sequences directly
when generating output filenames.
Add a regression test for expanding #1 after an ordinary letter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I recently noticed that
IO::Compress::Zipdoes currently not support setting the language encoding flag of a zip file member, which can result in file names with 'weird' characters when unpacking a zip file where the member names are UTF-8 encoded (for example with the Windows Explorer on Windows 7, but likely also with other tools).This pull request adds support for setting the flag when creating a zip file, and to get back the value of the flag when reading a zip file. It doesn't do any encoding or decoding of the name and comment fields.
This is also a very partial revert of 02889ff where the support for the language encoding flag was commented out in
IO::Compress::Zip. Unfortunately, I couldn't find a reason why this was done.I've already prepared a branch in
Archive-Zip-SimpleZipbased on this, so should this get merged, I'm planning to create a pull request forArchive-Zip-SimpleZipas well.