I have tried solutions as specified in other questions but none have worked. The DB table column is set to utf8_general_ci
. The problem is: one of the records contains a -
(hyphen). When being echoed onto the page it's displaying as a question mark inside a diamond (�). I've tried to specify the content type in the header:
header('Content-type: text/html; charset=utf-8');
However, it makes no difference - it's still not displaying the hyphen on the page. There is no encoding/decoding being done with the data prior to it being echoed so I'm confused as to what is causing this and how to fix this.
It's a client's site that I have taken over from a previous developer so I can't change any of the database encoding as it's a news outlet and I don't want to affect any indexed articles.