I'm trying to parse a text file using PHP.
In my database I have data which shows in phpmyadmin like this Triste o melancólico
And once it's retrieved it displays just fine on my website.
Now the issue has come when I try to parse this text file. I will have a word such as Etimología
Now I load the text file, parse it and if I echo the parsed data to the page it will display fine, no question marks / unwanted characters in replace of the í
. The thing is if I go to insert the data into my db the special character í
is being switched over to a question mark.
I've tried using
mysql_query("SET CHARACTER SET utf8");
After my sql connection but it did not make a difference.
Does anyone have any ideas as to why new text with special characters are being inserted as question marks, when pre existing text with special characters is working just fine?
Thanks