Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong handling of bit 11 #222

Merged
merged 3 commits into from Aug 18, 2022
Merged

wrong handling of bit 11 #222

merged 3 commits into from Aug 18, 2022

Conversation

mtak3
Copy link
Contributor

@mtak3 mtak3 commented Aug 12, 2022

APPENDIX D - Language Encoding (EFS)

...
D.2 If general purpose bit 11 is unset, the file name and comment SHOULD conform
to the original ZIP character encoding. If general purpose bit 11 is set, the
filename and comment MUST support The Unicode Standard, Version 4.1.0 or
greater using the character encoding form defined by the UTF-8 storage
specification. The Unicode Standard is published by the The Unicode
Consortium (www.unicode.org). UTF-8 encoded data stored within ZIP files
is expected to not include a byte order mark (BOM).
...


For UTF-8 it is a MUST to set bit 11.
If it's not UTF-8, just don't set it and don't make it an exception

APPENDIX D - Language Encoding (EFS)
------------------------------------
...
D.2 If general purpose bit 11 is unset, the file name and comment SHOULD conform 
to the original ZIP character encoding.  If general purpose bit 11 is set, the 
filename and comment MUST support The Unicode Standard, Version 4.1.0 or 
greater using the character encoding form defined by the UTF-8 storage 
specification.  The Unicode Standard is published by the The Unicode
Consortium (www.unicode.org).  UTF-8 encoded data stored within ZIP files 
is expected to not include a byte order mark (BOM). 
...

----

For UTF-8 it is a MUST to set bit 11.
If it's not UTF-8, just don't set it and don't make it an exception
@mtak3 mtak3 closed this Aug 12, 2022
@mtak3 mtak3 reopened this Aug 17, 2022
@coveralls
Copy link

coveralls commented Aug 17, 2022

Coverage Status

Coverage decreased (-0.3%) to 76.782% when pulling 05bf9c9 on tyrellsys:wrong_bit11 into 184587c on maennchen:master.

Copy link
Sponsor Collaborator

@NicolasCARPi NicolasCARPi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution. This looks good to me! 👍

@NicolasCARPi
Copy link
Sponsor Collaborator

I'll let @maennchen make a second review and merge though.

@maennchen maennchen merged commit 22f6044 into maennchen:master Aug 18, 2022
@maennchen
Copy link
Owner

@mtak3 Thanks a lot ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants