-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Set language encoding flag when using ZIPPacker
#78732
Conversation
Yes, the display is normal now, but ZIPReader cannot then parse the filename correctly.
The problem originates from
|
@zedrun00 Please make sure you are reading the zip file created by |
Yes ,this is local code:
|
|
So you mean that the bug is already fixed in the current 4.1 version (so also 4.1.rc1)? But in #78732 (comment) you tested this PR and still had problems, were you testing the patch on top of the 4.0 or 4.1 branch? |
#78732 will solve file name garbled. but garbled does not affect ZIPReader::read_file()
|
Forgive me for my foolish English |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working with all archivers I have tested (seems like setting the "version made by" is enough for most software).
There are two places in the editor/export/editor_export_platform.cpp
that are using zipOpenNewFileInZip4
, these probably should be changed to set bit 11 as well.
When non-ASCII filenames are used, this indicates that the encoding is UTF-8. Programs like ZIPReader can then parse the filename correctly.
Thanks! |
Cherry-picked for 4.2.1. |
Will this be fixed in the upcoming releases? It still gets in the way a lot. |
This is in 4.2.1 (it was even mentioned in the release post 🙂) it will also likely be in a future 4.1.x release |
Cherry-picked for 4.1.4. |
ZIPPacker
andZIPReader
will generate Garbled code #78726This PR sets the "Language Encoding Flag" when opening a new file in zip. This flag indicates that the filename and comment fields are encoded using UTF-81, so zip readers like
ZIPReader
can then parse the filename correctly.Extra parameters passed to
zipOpenNewFileInZip4
in this PR are the same as oneszipOpenNewFileInZip
will pass to it.Footnotes
https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.9.TXT ↩