查看Linux编码,如下图可看出Linux编码是 zh_CN.UTF-8

问题截图:
以下代码都会产生乱码
php
exex('unzip -d /xxx /x/test.zip');
exex('unzip -O zh_CN.UTF-8 -d /xxx /x/test.zip');
exex('unzip -I zh_CN.UTF-8 -d /xxx /x/test.zip');

解决方法:
php
exec('LANG=zh_CN.UTF-8 unzip -d /xxx /x/test.zip');