Forum Moderators: coopster
I have a PHP5 website using a MySQL5 db. The character set on site and in the db is UTF-8.
However, I'm still getting some problems with apostrophes and quote marks. Especially the right and left sloping ones MS Word use!
I thought that by added the form tag accept-charset="utf-8" to my forms would convert them to a valid character. However, they are still getting into the database.
I would have thought there would be some sort of clean up function available, but I'm unable to find one. I'm thinking of writing a function with a list of mb_str_replace() and change them all to '
What does everyone else do? This must be a common annoyance.
You say that apostrophes and quote marks are causing problems, but you don`t say what the problems are. If the issue it with your query failing use mysql_real_escape_string [php.net] when you do your insert.
If you want to strip them or change them, just use str_replace [php.net].
Or was it something else that was the problem?
dc