At the moment I’m reading rss feeds that may be encoded in any character type, using simplexml_load_file();
These feeds are then looped through in php and some parts are inserted into a mysql database that is utf8 with all tables utf8 general.
When inserted into the tables I can see the ‘ is replaced with ’ and – is replaced with –
These strange characters are then shown when selected back from the table and shown in a php file.
I’ve tried both utf8_decode and utf8_encode on insert and select from the database but this doesn’t help, what am I doing wrong?
put
mysql_query('SET CHARACTER SET utf8');before your insert and select queries