Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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...

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    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.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Please do not cross post. Read CF's posting rules and guidelines.

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •