Problem with accentuation in PHP

Asked

Viewed 20 times

0

I’ve done everything, I’ve changed server program, I’ve put charset tags in html and php, but nothing solves problem, always appears this symbol

inserir a descrição da imagem aqui

simple code index


php.

  • You should use an HTML charset <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /> in PHP <?php header("Content-Type: text/html; charset=ISO-8859-1",true);?>

  • 1

    Caro @brunox99x what if the page is UTF-8? What if the data coming from the database/mysql/etc or Apis is UTF8? and if the database is in utf8 the document saved in ANSI and the header is in iso-8859-1, what can cause? ... The reason we don’t give out-of-the-box answers by saying something like, "do this" is precisely because coding/codecs are more complicated, and it’s best to understand how the basics work and what they’re for and why there are different types, why dominate it, however incredible it may seem, is the basic, will be able to work with any codec without difficulties. I hope you understand, a great holiday

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.