I'm using utf8_unicode_ci for a Column in MYSQL Table to store TAMIL Language Characters.
I'm Implementing an AngularJS Project, in that I'm calling the PHP Service, the return type is a JSON Data. I Can't able to get the actual Characters, instead of that I'm getting ?????????.
My PHP Sample Source Code:
<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
$outp = "";
$sql_select = "";
$sql_select .= "SELECT * FROM poll_quest WHERE qid = $nqid LIMIT 1 ";
$bQuery = mysql_query($sql_select, $link);
while ($bRow = mysql_fetch_array($bQuery)) {
$qflag = true;
$outp .= '{ "ID": ' . $bRow['qid'] . ',';
$outp .= '"Ans":"' . $bRow['ans_tam'] . '" }';
}
$outp ='{"records":['.$outp.']}';
echo($outp);
?>
My Tamil Words are
- மோசம்
- மோசமாக இல்லை
- நன்று
- மிக நன்று
The MySQL Table Structure Snapshot:
The MySQL Table Data Snapshot:
The Output JSON Data Snapshot:
{
"records":[
{
"ID":"1",
"Ans":"??. ????????"
},
{
"ID":"2",
"Ans":"??. ?????????"
},
........
{
"ID":"5",
"Ans":"??. ??????????"
}
]
}
Kindly assist me, how to get the actual characters in the Response JSON...