#46456 [Fbk->Opn]: zip_entry_name() mangling national characters
| From: | mkurpel at gmail dot com | Date: | Mon, 03 Nov 2008 19:48:12 +0000 |
| Subject: | #46456 [Fbk->Opn]: zip_entry_name() mangling national characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-130571@lists.php.net to get a copy of this message | ||
ID: 46456
User updated by: mkurpel at gmail dot com
Reported By: mkurpel at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Zip Related
Operating System: FreeBSD 6.2-RELEASE-p8
PHP Version: 5.2.6
Assigned To: pajoye
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-11-03 18:56:48] pajoye@php.net
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] jani@php.net
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 :(
------------------------------------------------------------------------
[2008-11-01 18:16:38] derick@php.net
First of all, don't use utf8_encode... does it work then?
------------------------------------------------------------------------
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