I'm using an api that returns plain text in UTF8 since the accents appear as code. I've tried several solutions found on the internet and none of them work. I cannot understand why. It already includes the UTF-8 Meta html tag in the header, includes the following code before printing the text: header('Content-Type: text/html; charset=utf-8');
And now I'm doing it like this:
$string = 'Sonhar com um bar indica que voc\u00ea receber\u00e1 um aviso no trabalho que mudar\u00e1 seus planos para o pr\u00f3ximo ano. Voc\u00ea sentir\u00e1 que tudo est\u00e1 fluindo ao seu redor em uma dire\u00e7\u00e3o positiva. Voc\u00ea brinca com as emo\u00e7\u00f5es, mas ter\u00e1 que devolver algo, e n\u00e3o exatamente material. Seria \u00f3timo se voc\u00ea passasse o dia com ela e organizasse uma noite rom\u00e2ntica. Sensa\u00e7\u00e3o, tudo o que entra em voc\u00ea atrav\u00e9s dos sentidos, abre sua mente.';
echo utf8_encode($string);
None works!
How do I resolve this?