PDA

View Full Version : User copy paste from MSword to HTML junk comes in place of Single and double quotes


faraz
02-09-2009, 06:31 AM
I have a jsp page with textarea.
When Ever user copy paste from MsWord to my Textarea and submits.
It saved as junk text in place single quotes and double quotes.

Suppose somebody copy pasted from MSword
"hello How are you ?"

it is comes as
â¿¿ hello How are you ? â¿¿

Please help me...!!!
How to resolve...What should i do...

Fou-Lu
02-09-2009, 08:45 PM
Are you 100% certain you're looking for a java solution, or are you looking for a Javascript solution?
In either case, the problem is that the double quotations used by word are not the real double quotations. Using a UTF-8 encoding I believe solves that problem though. Then if you want the real quotations back, you simply search and replace for a specific char.

oracleguy
02-09-2009, 10:54 PM
Please do not cross post. Read CF's posting rules (http://www.codingforums.com/rules.htm) and guidelines. (http://www.codingforums.com/postguide.htm)

Original thread: http://www.codingforums.com/showthread.php?t=158264