pkrtech Posted September 2, 2006 Share Posted September 2, 2006 And I cannot get them to be converted to HTM unless I use eregi_replacecan 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 ? Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 2, 2006 Share Posted September 2, 2006 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? Quote Link to comment Share on other sites More sharing options...
w32 Posted September 2, 2006 Share Posted September 2, 2006 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.. Quote Link to comment Share on other sites More sharing options...
pkrtech Posted September 2, 2006 Author Share Posted September 2, 2006 ok lets take this for instance this is what my data shows after I encoded and sitting in the DBMicrosoftâ??sthats what the pure html is however I would assume that is just a ' or something similar but on the actual page showsMicrosoftâ??s Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 2, 2006 Share Posted September 2, 2006 How do you encode your html, prehaps it could be a charset issue. Post an example here of how you ecode your html/text. Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 2, 2006 Share Posted September 2, 2006 what method are you encoding information please .give us an example Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 2, 2006 Share Posted September 2, 2006 [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? Quote Link to comment Share on other sites More sharing options...
pkrtech Posted September 2, 2006 Author Share Posted September 2, 2006 I just run all the data through htmlentities(data, ENT_QUOTES);and urlencode($data); Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 2, 2006 Share Posted September 2, 2006 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. Quote Link to comment Share on other sites More sharing options...
pkrtech Posted September 2, 2006 Author Share Posted September 2, 2006 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. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 2, 2006 Share Posted September 2, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.