I am getting output as
FBI believed he had a ‘doomsday device’ instead of
FBI believed he had a ‘doomsday device’ when i am using
iconv("UTF-8", "ISO-8859-1//IGNORE", $topic); output is
FBI believed he had a âdoomsday deviceâ I am not using any header or charset in my file.
Update
Got why is this happening
when the UTF-8 series of numbers is interpreted as if it were ISO-8859-1 the output is
’
Explaination
0xE28099 breaks down as 0xE2 (â), 0x80 (€) and 0x99 (™). What was one character in UTF-8 (’) gets mistakenly displayed as three (’) when misinterpreted as ISO-8859-1.
Still no solution to convert it
SET NAMES 'UTF-8'€,’and‘are unrepresentable in ISO-8859-1. There is no reason to use ISO-8859-1 over Windows-1252 ever (in this context :P I'm sure it has uses because all the 256 characters are first 256 characters in unicode as well) because it just has useless control characters in place of characters like€