Grandt / PHPZip

PHP Class to create archives of compressed files in ZIP format.
http://www.phpclasses.org/package/6110
118 stars 21 forks source link

I see cyrillic file names like ¦-TА¦¬¦-¦¬ TА¦¦-TА¦¬.txt in zip archive in windows explorer #18

Open dfb243fda opened 10 years ago

dfb243fda commented 10 years ago

Hello, I tried to use all your examples with Zip and ZipStream with cyrillic file names. In winrar and total commander all is ok, but in windows explorer I see this: ¦-TА¦¬¦-¦¬ TА¦¦-TА¦¬.txt

Grandt commented 10 years ago

Just with the latest version (1.60), or did the previous version do the same?

dfb243fda commented 10 years ago

I tried version 1.60 and 1.37. This error in both versions

Grandt commented 10 years ago

I'll see what I can do about it. it probably won't be until tomorrow though. Can I get you to send me a sample zip file. I may be able to recreate the one you have, but it is always good to have one from someone who have the problems. Send it to php@grandt.com

dfb243fda commented 10 years ago

Thank you, I have sent zip file to you

Grandt commented 10 years ago

I can see the text, and can reproduce it as well. However I can't get Windows Explorer's built-in Zip wrapper to display Cyrillic characters. Zip files have no concept of encoding, except for whatever the zip application i happens to run on, and then utf-8. Sadly implementations are free to ignore utf-8 if they don't like it.

If you, or anyone else have a sample Zip file displaying the Cyrillic characters correctly in the Windows Explorer Zip wrapper, please sent it to me, I'd love to see how THAT was solved. :)

I have added some UTF-8 Extra fields for zip path and zip comments to the latest commit (1.61)

AsidStorm commented 8 years ago

May be this may help someone, to display russian names correct in Winrar or Explorer, you my try to use this:

iconv('UTF-8', 'CP866', $strFileName);