Jump to content

How do I stop these characters showing up ----> �


sambib

Recommended Posts

Hi I have a cms which gets content and displays it in php pages and I can't suss out how get rid of these types of characters [b]� [/b] (instead of apostrophes, single quotes or dashes etc).

I use addslashes before inputing the data- $d = addslashes($_POST['content']);

and I uses stripslashes when displaying the data

I've set magic quotes to off or on it doesn't seem to make a difference....?

any clues greatly appreciated...
I may be wrong, but I THINK they happen because the characters are not what you think they are... let me give an example, then you can tell me I'm wrong...

when you do " in m$ word, it changes it the those funny " that are different when you start the quote than when you end the quote, like the first ones are upside down or whatever. I think that is what you are seeing... I have dealt with them in the past with str_replace()
[!--quoteo(post=359646:date=Mar 29 2006, 11:07 PM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Mar 29 2006, 11:07 PM) [snapback]359646[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I may be wrong, but I THINK they happen because the characters are not what you think they are... let me give an example, then you can tell me I'm wrong...

when you do " in m$ word, it changes it the those funny " that are different when you start the quote than when you end the quote, like the first ones are upside down or whatever. I think that is what you are seeing... I have dealt with them in the past with str_replace()
[/quote]

I changed the charset of my pages to charset=utf-8 and it seems to have done the trick...
  • 2 years later...
I did change my charset to utf-8, and I am still getting issues.  I get â€, on some pages and  on others.  Some of the chars I find hiding in empty spaces.  I just delete the spaces, and sometimes they go away, but I have NO idea what is going on here...
  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.