mb_convert_encoding($message, 'UTF-8', mb_detect_encoding($message, array("ASCII",'UTF-8',"GB2312","GBK",'BIG5')))
json中文字符转换:
json_encode($arr,JSON_UNESCAPED_UNICODE)