Good morning,
I'm creating an API for studying, but I'm having some issues with accents.
When I do a search, I have a response of not found.
Below is a test.
Would you have a solution for me to solve this situation?
Q: Using Slim Framework
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 that the sent JSON is in UTF-8