From: Operating system: linux PHP version: 5.3.5 Package: Zip Related Bug Type: Bug Bug description:ZIP archive UTF-8 filenames problem
Description: ------------ when creating zip archive with non-english filenames, the filenames are not encoded correctly, upon extraction you get them like ???_???.txt. (tested with various unzipping software on windows/linux) a suggested workaround, e.g: $zip->addFile($file_data['path'], iconv("UTF-8","CP852",$file_name)); doesn't help Test script: --------------- <?php $zip = new ZipArchive(); if ($zip->open('/tmp/test.zip', ZIPARCHIVE::CREATE) === TRUE) { $zip->addFile('/tmp/file.txt', 'ק×××¥.txt'); $zip->close(); echo "done"; } else { echo "failed"; } ?> Expected result: ---------------- create a zip file which can be extracted reproducing the original file names. Actual result: -------------- non english file names comes out corrupted, e.g: ???_???.txt -- Edit bug report at http://bugs.php.net/bug.php?id=53948&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53948&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53948&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53948&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53948&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53948&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53948&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53948&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53948&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53948&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53948&r=support Expected behavior: http://bugs.php.net/fix.php?id=53948&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53948&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53948&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53948&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53948&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53948&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53948&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53948&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53948&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53948&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53948&r=mysqlcfg