in src/OSS/OssClient.php [3526:3550]
private function encodeFilePath($filepath)
{
if ($this->filePathCompatible !== true) {
return $filepath;
}
if (empty($filepath)) {
return $filepath;
}
try {
$encoding = array('UTF-8', 'GB2312', 'GBK');
$encode = mb_detect_encoding($filepath, $encoding);
if ($encode !== 'UTF-8') {
return $filepath;
}
$tmp = iconv($encode, 'GBK', $filepath);
if ($tmp !== false) {
$filepath = $tmp;
}
} catch (\Exception $e) {
//IGNORE
}
return $filepath;
}