Characters Encoded Incorrectly
Hi guys, really hoping someone can help me out because I'm pulling my hair out over this!!
My boss keeps writing texts in Word and forwards it on to me to post to our website which I've built but when he puts apostrophies in, they get turned into the wierd characters. The text is inserted into a database by PHP and the apostrophy looks like this in the database... ’
I am posting the input to the db in the following way...
Hope someone can help...
mysql_query("INSERT INTO table VALUES (
)") or die (mysql_error());
Thanks in advance
Something I came up with some time ago you could try: http://www.charles-reace.com/blog/20...-ms-word-text/
Note that in this function I also handle the characters converted by htmlspecialchars(), so you don't want to use it in conjunction with that function (or with htmlentities(), for that matter).
wow thanks Nogdog for a quick response...
I posted this question on a different forum last night and hadn't had a response back until funny enough just before you! I was told to try this...
It works for the apostrophy I was having trouble with, but I think I'll make use of the function on the page you linked also just incase any other wierd characters end up in there!!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)