魏长东

weichangdong

东邪

php json_decode 日语

直接json_decode的话,直接解不出来。


 
function decodeJapnase($str)
    {
        $new_str = json_encode($str);
        $new_str = preg_replace_callback('|\\\\u([0-9a-f]{4})|i',create_function('$aMatches', 'return mb_convert_encoding(pack("H*", $aMatches[1]), "UTF-8", "UTF-16");'),$new_str);
        return   json_decode(str_replace('\\','',$new_str));       
    }
"title":"\u65b0\u4e09\u56fd\u4f1d\u8aac \u6642\u7a7a\u306e\uff38\uff08\u30af\u30ed\u30b9\uff09","result_condition":"New app install and open app","description":"\u4eca\u56de\u306e\u5192\u967a\u821e\u53f0\u306f\u6df7\u6c8c\u9b54\u306e\u4ed5\u696d\u306b\u3088\u308a\u3001\u6642\u7a7a\u304c\u4ea4\u5dee\u3057\u305f\u4e09\u56fd\u6642\u4ee3\u3001\u5404\u6b66\u5c06\u305f\u3061\u306f\u81ea\u5206\u306e\u5927\u7fa9\u306e\u305f\u3081\u3001\u6226\u3063\u3066\u3044\u308b\u3001\u305d\u3057\u3066\u58ee\u5927\u306a\u71b1\u8840\u306a\u5927\u4e71\u95d8\u306e\u5e55\u304c\u958b\u3044\u305f\u3002\u5404\u82f1\u96c4\u306f\u81ea\u5206\u306e\u9663\u55b6\u3092\u4f5c\u308a\u3001\u6b63\u7fa9\u306f\u90aa\u60aa\u3068\u6226\u3063\u3066\u3001\u6fc0\u3057\u3044\u4e09\u56fd\u5236\u8987\u6226\u304c\u767d\u71b1\u5316\u3059\u308b\u3002\u305d\u3057\u3066\u3001\u8ab0\u3082\u77e5\u3089\u305a\u5927\u304d\u306a\u9670\u8b00\u304c\u6b66\u5c06\u305f\u3061\u306b\u8fd1\u3065\u3044\u3066\u3044\u308b",