...
|
...
|
@@ -37,10 +37,15 @@ class MailFun { |
|
|
* @time 2023/3/27 13:55
|
|
|
*/
|
|
|
public static function mb_coding(string $str,array $appcode=[]){
|
|
|
$encode = mb_detect_encoding($str, array_merge(array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'),$appcode));
|
|
|
if($encode){
|
|
|
return mb_convert_encoding($str, 'UTF-8', $encode);
|
|
|
try {
|
|
|
$encode = @mb_detect_encoding($str, array_merge(array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'),$appcode));
|
|
|
if($encode){
|
|
|
return @mb_convert_encoding($str, 'UTF-8', $encode);
|
|
|
}
|
|
|
}catch (\Throwable $e){
|
|
|
|
|
|
}
|
|
|
|
|
|
return $str;
|
|
|
}
|
|
|
|
...
|
...
|
|