0

I have a string passed from an API, and in place of certain characters, this appears instead of the original char ç.
I've already tried html_entity_decode, utf8_encode, utf8_decode,htmlentities, etc..

Any idea what I can try? The string is originally encoded in UTF-8

Adam Silva
  • 1,013
  • 18
  • 48
  • do you have this on your html page: `` – BizzyBob Feb 24 '17 at 15:47
  • Dont use functions to alter the charset like that, fix the root of the issue instead. There's a little list of things that fixes your issue in 90% of the cases, http://stackoverflow.com/a/31899827/4535200 – Qirel Feb 24 '17 at 15:47
  • @BizzyBob Yes. I'm using Laravel, and on the main template there is that – Adam Silva Feb 24 '17 at 15:48
  • @Qirel I think I've checked everything. My app has the headers, in both php and html. I have no tables, I'm getting the data from an API from a management program. Don't know what else to do. Isn't there a way to encode the string, besides the functions I already mentiond to just convert the string? – Adam Silva Feb 24 '17 at 15:53
  • If you put some static data with those characters (not via the API), is it still broken? If it works with the static data, it likely means there's something with the API, or how you use the API. But check what the file-encoding is too, that can be the issue. – Qirel Feb 24 '17 at 15:55

0 Answers0