How to read Asiatic characters (Japanese, Chinese) after json_encode in PHP

buttercup

New Member
I've read every post about the topic but I don't think I've found a reply to my question, that's driving me crazy.I got a couple of php files, one stores data into mySQL db, another one read those data: I get data from all over the world and it seems that I succeed to store asiatic character in a right way, but when I try to read those data I can't get those characters back.As many other users I got ?? instead of the correct chars. Top of my PHP files I got:\[code\]header('Content-Type: application/json; charset=utf-8');\[/code\] then\[code\]mysql_query("SET CHARACTER SET utf8", $link);mysql_query("SET NAMES 'utf8'", $link);\[/code\] then\[code\]$fab[] = array_map(utf8_encode,$array);\[/code\]Here if I \[code\]print_r ($fab)\[/code\] I lost asiatic chars :-(Then when I do:\[code\]$json_string = json_encode($fab); //originale\[/code\]What I get is \[code\]"??"\[/code\].How is the correct way to get the right chars back? The json string is then passedto an iPhone client.Any suggestion or help would be sooo appreciated.Thank you anyway,Fabrizio
 
Back
Top