I’ve asked this question before, here, however that solution didn’t fix it when I looked closely. This is the problem.
For some reason, my mysql table is converting single and double quotes into strange characters. E.g
'aha'
is changed into:
“ahaâ€
How can I fix this, or detect this in PHP and decode everything??
Previously i tried doing this query right after connecting to MySQL:
$sql='SET NAMES 'latin1''; mysql_query($sql);
But that no longer has any effect. I’m seeing strings such as:
“aha†(for 'aha') It’s (for 'its')
etc.
Any ideas?
As per the answer to your original question, your input is actually in UTF-8, but the output you’re seeing looks wrong because your output terminal and/or browser is set to the (single byte) character encoding ‘Windows 1252’.
If you just make sure that your output is also set to UTF-8 then everything should be fine.
See Quotation marks turn to question marks