From: matti dot jarvinen at nitroid dot fi Operating system: Fedora 3.8.6-203.fc18.x86_64 PHP version: 5.4.20 Package: Zip Related Bug Type: Bug Bug description:ZipArchive reads filenames with UTF-8 characters wrong
Description: ------------ I have a valid Zip file created with Windows 8 and with iZarc containing filenames like 12-päivä.pdf, 13-päivä.pdf ZipArchive reads filenames wrong. At least getNameIndex and extractTo are affected. Test script: --------------- <?php mb_internal_encoding('UTF-8'); ini_set('default_charset', 'UTF-8'); $Zip = new ZipArchive(); $open = $Zip->open('test.zip'); $length = $Zip->numFiles; for($i = 0; $i < $length; $i++) { $importName = $Zip->getNameIndex($i); print $brokenImportName; die(); // this is a specific workaround. Some characters are stuck in ASCII apparently //$fixedImportName = str_replace(chr(132),'ä',$brokenImportName); //print $fixedImportName; } ?> Expected result: ---------------- 12-päivä.pdf Actual result: -------------- 12-p�iv�.pdf -- Edit bug report at https://bugs.php.net/bug.php?id=65815&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65815&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=65815&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65815&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65815&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65815&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65815&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65815&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65815&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65815&r=support Expected behavior: https://bugs.php.net/fix.php?id=65815&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65815&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65815&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65815&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65815&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65815&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65815&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65815&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65815&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65815&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65815&r=mysqlcfg