go to bug id or search bugs for
ExtractTo cuts off non latin file names, no matter of codepage, til first space, so 'имя файла.txt' becomes ' файла.txt'. Filenames with no spaces gets cut off at all to extension only - '.txt'. getNameIndex returns full file names.
Also ZipArchive relies on default_charset. When default_charset is different from archive charset, files will be unpacked with broken names.
Problem appears on Ubuntu 12.04 with PHP 7.1.4 and with Debian 9 with PHP 7.0.16. First problem does not appear on Windows.
Add a Patch
Add a Pull Request
I've found that basename() does exactly the same, so it's seem to be related.
I have the same problem.I can use "unzip -O cp936" get the filename.The filenam is wrong when I use ZipArchive to get the file.
PHP 7.0.23 with Windows
Related To: Bug #69477