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...
Link to comment
Share on other sites

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()
Link to comment
Share on other sites

[!--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...
Link to comment
Share on other sites

  • 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...
Link to comment
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.