Jump to content

Archived

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

pkrtech

Decode special characters

Recommended Posts

And I cannot get them to be converted to HTM unless I use eregi_replace

can anyone tell me how to ?  Here is what I cant find a function to convert automatically.

I have been using urldecode()  as well as htmlentities_decode  but as I am going through more text this weird crap keeps popping up. Is there something I am missing ? Or do I have to manually eregi_replace each on that pops up ?

[code]
'

â??

Source = …  showing through html = …

'

"

Source  =  »      showing through html = »

[/code]

There is alot more variations I am finding. any ideas ?

Share this post


Link to post
Share on other sites
Dont get it do you encode the words and the words come out funny looking ?

or are the words going into the database in a funny looking way?

Share this post


Link to post
Share on other sites
question, are those special characters in your php code, or are they in html bits. If in the html bits they should render just fine...and if they are in your php coding why would you be using special chars there??

I am confused..

Share this post


Link to post
Share on other sites
ok lets take this for instance this is what my data shows after I encoded and sitting in the DB

Microsoftâ??s

thats what the pure html is however I would assume that is just a ' or something similar but on the actual page shows

Microsoftâ??s

Share this post


Link to post
Share on other sites
How do you encode your html, prehaps it could be a charset issue. Post an example here of how you ecode your html/text.

Share this post


Link to post
Share on other sites
[quote author=redarrow link=topic=106631.msg426561#msg426561 date=1157211942]
what method are you encoding information please .

give us an example
[/quote]
Why have you posted what I basically just said?

Share this post


Link to post
Share on other sites
Use html_entity_decode when you have converted HTML special characters into thier html enitity equivalent. urldecode is for decoding encoded url strings with the urlencode function.

Share this post


Link to post
Share on other sites
Im aware of that, doesnt work for the characters I provided. 99% of the characters it works just some that pops up. I already have 13 eregi_replace statements its getting out of hand.

Share this post


Link to post
Share on other sites
Are you using urlencode and htmlentities together? Remove urlencode. As that could be the problem. Just use htmlenties to convert the html characters to their html entity equivilant. Also post your actuall code here too. SO I can see how your script process the data.

Share this post


Link to post
Share on other sites

×

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.