ID: 46456 Updated by: [EMAIL PROTECTED] Reported By: mkurpel at gmail dot com -Status: Open +Status: Bogus Bug Type: Zip Related Operating System: FreeBSD 6.2-RELEASE-p8 PHP Version: 5.2.6 Assigned To: pajoye New Comment:
Here is a screen shot: http://pierre.libgd.org/zip/46456.png the console output uses the script below, the GUI is Winrar (same with Winzip or windows compressed folder). <?php $somezipfile = '46456.zip'; $zip = zip_open(realpath($somezipfile)); while ($zip_entry = zip_read($zip)) { echo zip_entry_name($zip_entry); } zip_close($zip); There is no difference, no bug > bogus. As Derick said earlier, you are messing with the encoding and try to encode something that it is already UTF-8. Previous Comments: ------------------------------------------------------------------------ [2008-11-03 19:48:11] mkurpel at gmail dot com You can find the zip file here: http://kotuha.com/file/zWio7-aaa.html There is a xls file inside with the filename µ¹è»¾ýáíéúôòäóìïøåöëü ¥©È«®ÝÁÍÉÚÔÒÄÓÌÏØÅÖËÜ.xls and it should display the xls filename exactly like it is (with national characters). With the code originally provided it looks like this: http://obrazok.eu/files/6hhmttlsmiwezc8gmo6m.png All non-national characters (if there were any in the xls filename) are retained, national characters get garbled. ------------------------------------------------------------------------ [2008-11-03 18:56:48] [EMAIL PROTECTED] Please post a link to the zip archive you use for your tests as well as an image to show us how the text should be displayed (if it is using non ascii chars :). ------------------------------------------------------------------------ [2008-11-03 18:38:30] mkurpel at gmail dot com Jani, tried it with no luck again, this was the output: http://obrazok.eu/files/bg05v7lyfto1i883czzs.png I have tried many more things, such as iconv and mb_convert_encoding but nothing helped. And I cannot replace those mangled characters by the desirable ones since zip_entry_name() returns the same mangled character for different national characters. ------------------------------------------------------------------------ [2008-11-03 08:37:02] [EMAIL PROTECTED] Ditch those mb_* calls and remove that setlocale() call too. Then replace utf8_encode() with utf8_decode().. ------------------------------------------------------------------------ [2008-11-01 19:01:04] mkurpel at gmail dot com No, it does not, it outputs some garbled characters :( ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/46456 -- Edit this bug report at http://bugs.php.net/?id=46456&edit=1