Hi all,
I am trying to pull data from remote sql DB into lua table using php file to convert into json. I am using
[lua]
print json_encode($rows);
[/lua]
The issue that Arabic characters appear as ??? ??? . Any one has an idea how can I read Arabic language using properly
[lua]
<?php
 $username = “*****”;
 $password = “**********”;
 $dbname = “*************_db”;
 $hostname = “*.**********.com”;
$qry = “select * from Events”;
 mysql_connect ($hostname, $username, $password) OR DIE (“Unable to connect to database! Please try again later.”);
 mysql_select_db($dbname) OR DIE (“Can not connect to database”) ;
$result = mysql_query($qry);
if ($result != FALSE && mysql_num_rows($result) > 0) {
$rows = array();
 while($r = mysql_fetch_assoc($result)) {
 $rows[] = $r;
 }
 print json_encode($rows);
}
 else {
 print “Error: No records returned.”;
 }
?>
[/lua]
Thanks
Abdul
      
    