im creating an Ionic Framework Application. i retrieve a set of database records through json format and display it on my ionic application.
but my application page displays ?????
for arabic characters
My db table
I use json to retreive the records
$query = "SET NAMES 'utf8'";
$query = "SET CHARACTER SET utf8";
$query = "select * from XXXX ";
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
$arr = array();
if($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$arr[] = $row;
}
}
echo $json_response = json_encode($arr, JSON_UNESCAPED_UNICODE);
The json Output
[{"arabic_title":"???????","offer_type":"0"}]
In my ionic application i have used
<meta http-equiv="Content-Type" content="application/json ; charset=utf-8" />
but i still don't get the arabic character