3
When receiving the data in PHP use an Encode to transfer the data to the variable:
header("Content-Type: text/html; charset=UTF-8",true);
$json = json_decode(file_get_contents('php://input',true));
$texto= utf8_encode($json->{"texto"});
and to return the data:
echo json_encode($response,JSON_UNESCAPED_UNICODE);
Make sure the JSON sent is in UTF-8