Issue: special characters

Discussion in 'Java' started by Raghu Raman, Jul 15, 2011.

  1. Raghu Raman

    Raghu Raman

    Joined:
    Jul 15, 2011
    Messages:
    1
    If one special character (" ' " , " - " ) is pasted from Outlook or some other app and then into our java application and save character with – apprea on the text area on the java application. If again we save the text, the the special characters string might triple again.

    Say user had copied text KHPA DAI – Additional DCG Groups to our java application, when saved and retrived that particular think, this would be seen as KHPA DAI – Additional DCG Groups. When saved the text in the database( Oracle ) its stored as KHPA DAI â?? Additional DCG Groups.


    Here is a simple demonstration.
    The following line contains a dash, a space, an apostrophe and another space, four characters in all.
    – ’
    Paste those four characters into a PIF special instructions on our jsp page. Then repeatedly save and re-query the PIF (without submitting and without making any changes to the data), and watch the size of the field grow:
    1. – ’
    2. – ’
    3. – ’
    4. – ’
    5. – ’



    below is the code snap shot of the textarea field

    String specialInstructions = "";



    <td><textarea rows="3" cols="60" name="specialInstructions" id="specialInstructions" onchange="javascript:assigntempVal();"><%=specialInstructions%>
    </textarea><input type="hidden" name="splInstTemp" id="splInstTemp" value="<%=specialInstructions%>"/>
    </td>

    Appreciate all Java Guru's to help me out with a solution on how to handle these a dash & an apostrophe when entered or copied from other application into the text area of the java application.

    How to handle such situation? :-(


    Regards
    RR
    Raghu Raman, Jul 15, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Mueller
    Replies:
    3
    Views:
    32,954
    Stefan Mueller
    Jul 23, 2006
  2. xah@xahlee.org

    Re: Meta-Characters, Special Characters

    xah@xahlee.org, May 30, 2007, in forum: Java
    Replies:
    2
    Views:
    1,070
    Ingo Menger
    May 31, 2007
  3. rvino
    Replies:
    0
    Views:
    4,635
    rvino
    Aug 14, 2007
  4. Nicolas Gaiffe
    Replies:
    3
    Views:
    121
    Nicolas Gaiffe
    Jan 13, 2009
  5. majna
    Replies:
    4
    Views:
    638
    Thomas 'PointedEars' Lahn
    Sep 19, 2007
Loading...

Share This Page