I host the web service in the PHP JSON release.
I have a Hebrew dataset in a database, and I'm sending this as output to a web service.
When I send data initially, it outputs the result as follows:
JSON:
{ "tasklist": [ { "customerID": "9936", "name": "טר ×רמ×" ×™×–×•× ×•×'×™× ×•×™ ×'×¢"מ", "cargo":"××'רר", "destination":"מכר", "quantity":"1.000000", "startdate":"03/01/201300: 00: 00" } ] }
But this "××'רר" may be available for analysis by the Android / Iphone parser and convert it to the original Hebrew. But I encountered an error in the " "name": "טר ×רמ×" ×™×–×•× ×•×'×™× ×•×™ ×'×¢"מ", . where " is between the line, so JSON is invalid and shows an error!

To abort this problem, I used UTF-8 to convert this "××'רר" this to Hebrew "נברר" . But in this case, the problem remains the same:
PHP:
header ('Content-type: text / html; charset = UTF-8');
JSON:
{ "tasklist": [ { "customerID": "9936", "name": "טר ארמה יזום ובינוי בע"מ", "cargo":"נברר", "destination":"מכר", "quantity":"1.000000", "startdate":"03/01/201300: 00: 00" } ] }
But the problem remains:

Also in some cases I get this due to using UTF-8
"name":"מחצבות כפר גלעדי-חומרי מ "
- How can I solve this problem?
- Is there any other specific code I need to use?
Note. Data cannot be modified in the database. The solution should be at the time of the output in JSON.
How the data stored in the database is displayed:
name
× × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × × /
My PHP Script that outputs JSON:
<?php //My DB connection and Query comes here $jsontext = '{"tasklist":['; while($row = mysql_fetch_array($queryExe)){ $jsontext .= '{"customerID":"'.$row['AUTO_ID'].'",'; $jsontext .='"name":"'.$row['Customer_Name'].'",'; $jsontext .='"cargo":"'.$row['Type_of_Cargo'].'",'; $jsontext .='"destination":"'.$row['Destination'].'",'; $jsontext .='"quantity":"'.$row['Quantity'].'",'; $jsontext .='"startdate":"'.$row['startdate'].'"},'; } $jsontext = substr_replace($jsontext, '', -1); // to get rid of extra comma $jsontext .= "]}"; header('Content-type: text/html; charset=UTF-8'); //Output the final JSON echo $jsontext; ?>
Thanks for your help in advance!
Was the question clear? to understand my problem.