944,208 Members | Top Members by Rank

Ad:
Oct 20th, 2006
0

having problem with some chars to display

Expand Post »
Dear All
i am totally confuse in how to explain the issue.
i will try
i am web master of one site
www.makePakistanbetter.com
if you check this link,there is one issue
you will be seeing there this txt
1 "Burney’s"
but this is not what i entered.
in the text box i pasted the text which i copied frm other site and it was
2 "Burney's"
when i saved and displayed this to the page it appears as above 1 instead of above 2.
this is happening with some other chars as well.
but the interesting thing is , if i try to edit this, then the whole text will be moved to the text box , and there it appears correct as above 2, but again if i save it will be as above 1.
another scenario is, if i edit this copied 2 text manually then it will appear correct.
so there is some thing wrong in copy and paste.
i will really appreciate if some one can help.
my findig is, may be i have to add soem char-set in head or some thing like th, and those char-sets are automatically associated with txt box.
thanking u in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
noman78 is offline Offline
40 posts
since Nov 2005
Oct 20th, 2006
0

Re: having problem with some chars to display

What are you copying and pasting from?

Unless you are copying pure text from a text editor, anything you grab from a website or Word document will likely contain some formatting characters and these will show up as odd characters or little squares.

Try pasting into Notepad and see what happens.

The reason those characters show is because that's what you're pasting into your code.
Reputation Points: 32
Solved Threads: 9
Posting Whiz in Training
SnowDog is offline Offline
214 posts
since Oct 2006
Oct 20th, 2006
0

Re: having problem with some chars to display

thankyou
you are right may be, some time i cpy from yahoomails or other web sites. but how i can over come this situation as users will keep on doing this, they can copy text from any site and paste in the website editor , in web site editor it appear fine but when they will ave it, it will appear wrong.
what i think in page i ahve to add some thing/code, which i dont know what?
Reputation Points: 10
Solved Threads: 0
Light Poster
noman78 is offline Offline
40 posts
since Nov 2005
Oct 20th, 2006
0

Re: having problem with some chars to display

It isn't a security thing. It's just what happens when you copy from one application and paste into another most times.

I notice it most in forums where people type their replies in Word and then paste that into the rich text editor because that way they can use a spellchecker.

If you use PHP you can use the preg_match function - or one of the string handling functions - to strip out the characters you don't want. But it is always going to take a bit of effort to clean it up if you grab your content that way.
Reputation Points: 32
Solved Threads: 9
Posting Whiz in Training
SnowDog is offline Offline
214 posts
since Oct 2006
Oct 21st, 2006
0

Re: having problem with some chars to display

Again thanx, i think now i have to do reate sme function to eleminate these string vhars, coz i think they are not too many, most of time they are attached with (") or ('), i was looking for some built in methid, but s far it seems there wont be any.
i m uing asp and java/vb script
Reputation Points: 10
Solved Threads: 0
Light Poster
noman78 is offline Offline
40 posts
since Nov 2005
Oct 21st, 2006
0

Re: having problem with some chars to display

This may help you get started:

http://javascript.internet.com/forms...haracters.html

You just tell the script which characters to want taken out and it does it. I haven't tested this script, but this source is usually very good.
Reputation Points: 32
Solved Threads: 9
Posting Whiz in Training
SnowDog is offline Offline
214 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Print button using rollover images
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: "make Us Your Homepage" Script ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC