I'm making a page with latin accents like á, ã, ç
, and others. This site pulls data from a SQL database. I'm using this on the <head>
: <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/>
With this header the HTML accented characters are fine, but the SQL data is being displayed as çã
instead of ão
, and if I change the charset
from ISO-8859-1 to UTF-8, all the HTML accented characters are displayed by a � (question mark) and the SQL data shows accents just fine.
Is there any way to fix it besides escaping either all the HTML characters or the SQL ones?
PS: I've already tried mysql_set_charset('utf8');
and SET NAMES utf8
, neither worked to me.