JDP 發表於 2012-4-9 08:54:43

FengOffice 2.0 壓縮及解壓縮檔名亂碼問題 in Windows

壓縮檔內容檔名亂碼問題
修改 fengoffice\application\controllers\FileController.class.php 2112行

$zip->addFile($file_to_add_path, utf8_safe($file_to_add->getFilename()));改成
$zip->addFile($file_to_add_path, iconv("UTF-8","big5",$file_to_add->getFilename()));
解壓縮檔名亂碼問題
1. 修改 fengoffice\application\controllers\FileController.class.php 2009行

$this->upload_file(null, $e_name, $tmp_path, $members);改成
$this->upload_file(null, iconv("big5","UTF-8",$e_name), $tmp_path, $members);2. 將2000~2006行mark掉
/*
$e_name = preg_match_all('/([\x09\x0a\x0d\x20-\x7e]'. // ASCII characters
'|[\xc2-\xdf][\x80-\xbf]'. // 2-byte (except overly longs)
'|\xe0[\xa0-\xbf][\x80-\xbf]'. // 3 byte (except overly longs)
'|[\xe1-\xec\xee\xef][\x80-\xbf]{2}'. // 3 byte (except overly longs)
'|\xed[\x80-\x9f][\x80-\xbf])+/', // 3 byte (except UTF-16 surrogates)
$e_name, $clean_pieces);

$e_name = join('?', $clean_pieces);
*/



頁: [1]
查看完整版本: FengOffice 2.0 壓縮及解壓縮檔名亂碼問題 in Windows