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

Recommended Answers

All 5 Replies

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.

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?

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.