I´ve found the solution
Apparently hostgator phpmyadmin doesn't have the UTF-8 header on it.
Recently I moved my web forum from a development local machine to a production server (Hostgator, shared), but something weird is going on, everytime we pump data out of the database and display it we get replacement characters in lieu of special Portuguese charcters (á, é, ê, ó, ç and so on), even though the database is set to use UTF-8 (on the database, tables, rows and connection). When we pass the same exact string to a mb_detect_encoding
it says that it is a valid UTF-8 string.
The only thing that makes the data from the database display properly is to remove the <meta charset="utf8">
from the HTML, but then all the other special characters (from text that isn't from the database) gets garbled.
What the HTML is going on?
PHP 5.2
MySQL 5.5.30-30.2
About the posible duplicate question, I (personally, of course) don't think that it's a fit, because that other question assumes prior knowledge and work with text encoding.