Page 1 of 1

MySQL PHP and special character problem

Posted: Sun Jan 03, 2010 5:08 am
by kountz
I've built a really simple database that gets updated via some small php scripts. The database has multiple translations in it, which initially are all in English.

The problem i'm having is that everything works fine until i update one of the translations with say Finish which has bucket loads of special characters. The fields that contain special characters don't get updated and i can't figure out how to get round it. I've taken a look at the collation of the fields but I'm a novice in SQL. Currently the translations fields are set to 'utf8_general_ci'.

Has anyone else come across this problem? and point me in the right direction of a solution?

Re: MySQL PHP and special character problem

Posted: Sun Jan 03, 2010 8:55 am
by Darhazer
Do you use mysql_real_escape_string() before sending data to MySQL?
Is your page also with UTF-8 encoding?
What is the connection encoding? Maybe you have to perform SET NAMES before sending data to MySQL?