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:
header('Content-Type: application/json; charset=utf-8');
then
mysql_query("SET CHARACTER SET utf8", $link);
mysql_query("SET NAMES 'utf8'", $link);
then
$fab[] = array_map(utf8_encode,$array);
Here if I print_r ($fab)
I lost asiatic chars :-(
Then when I do:
$json_string = json_encode($fab); //originale
What I get is "??"
.
How is the correct way to get the right chars back? The json string is then passed to an iPhone client.
Any suggestion or help would be sooo appreciated.
Thank you anyway, Fabrizio