User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,110 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,087 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1206 | Replies: 5
Reply
Join Date: Nov 2005
Location: Dubai,UAE
Posts: 36
Reputation: noman78 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
noman78's Avatar
noman78 noman78 is offline Offline
Light Poster

Help having problem with some chars to display

  #1  
Oct 20th, 2006
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Posts: 214
Reputation: SnowDog is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 7
SnowDog's Avatar
SnowDog SnowDog is offline Offline
Posting Whiz in Training

Re: having problem with some chars to display

  #2  
Oct 20th, 2006
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.
Reply With Quote  
Join Date: Nov 2005
Location: Dubai,UAE
Posts: 36
Reputation: noman78 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
noman78's Avatar
noman78 noman78 is offline Offline
Light Poster

Re: having problem with some chars to display

  #3  
Oct 20th, 2006
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?
Reply With Quote  
Join Date: Oct 2006
Posts: 214
Reputation: SnowDog is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 7
SnowDog's Avatar
SnowDog SnowDog is offline Offline
Posting Whiz in Training

Re: having problem with some chars to display

  #4  
Oct 20th, 2006
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.
Reply With Quote  
Join Date: Nov 2005
Location: Dubai,UAE
Posts: 36
Reputation: noman78 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
noman78's Avatar
noman78 noman78 is offline Offline
Light Poster

Re: having problem with some chars to display

  #5  
Oct 21st, 2006
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
Reply With Quote  
Join Date: Oct 2006
Posts: 214
Reputation: SnowDog is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 7
SnowDog's Avatar
SnowDog SnowDog is offline Offline
Posting Whiz in Training

Re: having problem with some chars to display

  #6  
Oct 21st, 2006
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:59 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC