Answer the question
In order to leave comments, you need to log in
How to unzip an archive created under Windows on a Linux server?
Hello!
Please help if you know how.
I create an archive under Win 8. The archive contains Cyrillic names. I upload it to the server, and there it should unpack. But when unzipping, Cyrillic names turn into a bunch of hieroglyphs.
I tried to create zip, 7z, rar archives and unzip them with different methods. Used the PCLZIP library ( www.phpconcept.net/pclzip/) and the exec function:exec('unrar archive.rar');
exec('unzip archive.zip');
exec('unzip -O utf8 archive.zip');
exec('unzip archive.zip');
exec('convmv -f cp1252 -t cp850 -r * --notest');
exec('convmv -f cp866 -t utf-8 -r * --notest');
exec('unzip -O cp850 archive.zip');
exec('convmv -f cp866 -t utf-8 -r * --notest');
Answer the question
In order to leave comments, you need to log in
1) Try it without a library, Phar's built-in support allows you to unpack tar, tar.gz, tar.bz2, zip archives (but the speed will be lower, for several megabytes it's not critical, for large files it may not be suitable)
2) Try tar, it will most likely be faster and easiest, tar.bz2 if you need to compress
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question