My filepathes inside the zip are in UTF-8.
folder31/subtitlehéhà32.stl
But when I download and open the zip, I got this :
subtitlehéhà 32.stl
subtitleh+®h+á32.stl
The problem seems to be solved in the zipStream-php project:
rlatkn/ZipStream-PHP@55b9e39
Looking into the code I see that the ZipStreamedResponseBundle
already use the good flag in the general purpose flag
// tell us that Data Descriptor MUST be send,
// because crc32&lengths in "local file header" are set to 0
const ZIP_GENERAL_PURPOSE_DATA_DESCRIPTOR = "\x08\x00";
[edit]
I was mistaken by your custom flag.
I found the solution.
To get correct utf-8 in filepathes, need to set bit 11 in general purpose flags:
// tell us that Data Descriptor MUST be send,
// because crc32&lengths in "local file header" are set to 0
// Encoding must be in UTF-8
const ZIP_GENERAL_PURPOSE_DATA_DESCRIPTOR = "\x08\x08";
This will force to use UTF-8 in filepathes, so maybe you can set a config parameter to activate this mode.
My filepathes inside the zip are in UTF-8.
folder31/subtitlehéhà32.stl
But when I download and open the zip, I got this :
subtitlehéhà 32.stlsubtitleh+®h+á32.stlThe problem seems to be solved in the zipStream-php project:
rlatkn/ZipStream-PHP@55b9e39
Looking into the code I see that the ZipStreamedResponseBundle
already use the good flag in the general purpose flag
[edit]
I was mistaken by your custom flag.
I found the solution.
To get correct utf-8 in filepathes, need to set bit 11 in general purpose flags:
This will force to use UTF-8 in filepathes, so maybe you can set a config parameter to activate this mode.