Php default character set is UTF-8. All special characters in PHP and HTML are outputting as question mark like "?" in the browser. All data with special characters are stored as UTF-8 in database fields. But when PHP reads the database and output to browsers, all special characters like copyright and trademark symbols are ?
Data cannot be encoding as htmlentities, because otherwise data wouldve been outputted in the browser as html code. The fields in the database have html markups. It's like a wysiwyg field.
The other similiar question didn't really solve the problem. My problem is that php is reading a database field encoded in utf-8 including html markup, text and special characters. Then save the data in another utf-8 encoded database field. But something in the middle isn't right. After the process is done, special characters in new mysql columns are ?. Thus browser is displaying ? for all special characters.
$conn = new mysqli($host, $username, $password, $dbName);
mysql_set_charset('utf-8',$conn);
$categoryDescription = utf8_encode(utf8_decode($var['manufacturer_overview']));