ID: 46456
User updated by: mkurpel at gmail dot com
Reported By: mkurpel at gmail dot com
Status: Bogus
Bug Type: Zip Related
Operating System: FreeBSD 6.2-RELEASE-p8
PHP Version: 5.2.6
Assigned To: pajoye
New Comment:
My god, the string got converted to html entities again :-/
Previous Comments:
------------------------------------------------------------------------
[2008-11-04 14:18:32] mkurpel at gmail dot com
I tried the same script as pajoye sent here. Only added a second line
with original filename for comparison:
<?php
$somezipfile = '46456.zip';
$zip = zip_open(realpath($somezipfile));
while ($zip_entry = zip_read($zip))
{
echo zip_entry_name($zip_entry);
}
zip_close($zip);
?>
<br>
ľčťýáíéúôňäóěďřĺöëü
ĽČŤÝÁÍÉÚÔŇÄÓĚĎŘĹÖËÜ.xls
Be sure to save it as ANSI (so we are not messing with utf-8 now). What
it outputs is: http://obrazok.eu/files/79gro4t39dzzzr3mk6u7.png
The strings should be the same. I do not think what it outputs is okay.
------------------------------------------------------------------------
[2008-11-04 13:08:54] [EMAIL PROTECTED]
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.
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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