In my php app I did the following:
$dn = sys_get_temp_dir() . '/' . uniqid('td', false);
if (mkdir($dn) === true)
{
$fn = $dn . '/' . '関連事業調査.xls';
$writer = new \PHPExcel_Writer_Excel5($wb);
$writer->save($fn);
$fzip = sys_get_temp_dir() . '/' . uniqid('td', false) . '.zip';
$password = $this->container->getParameter('ZipPassword');
$out = null;
$ret = null;
exec("zip -qjP $password $fzip $dn" . '/*', &$out, &$ret);
}
In linux environment it correctly creates zip file with given password. I can unzip the files in Linux without any problem. But if I download it to Windows, and extract the files, file names become incorrect. How to solve this problem?