php-rar icon indicating copy to clipboard operation
php-rar copied to clipboard

The compressed package path contains Chinese, RarArchive:: open returns false

Open Iamgoo opened this issue 3 years ago • 0 comments

I encountered two problems in the project. One is that calling the RarArchive:: open method will return false while the compressed package path contains Chinese. The other is that the decompression directory path contains Chinese, and the directory created by calling the RarEntry:: extract method will appear garbled code

Please test like this Problem 1

\RarArchive::open('E:/测试/test.rar') or \RarArchive::open('E:/test/测试.rar')

Problem 2

$rarArch = \RarArchive::open('E:/test.rar');
$entries = $rarArch->getEntries();
foreach ($entries as $entry)
{
      $entry->extract('E:/测试');
}
$rarArch->close();

Iamgoo avatar Jan 16 '23 08:01 Iamgoo