Replacing Accented characters from a String

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gsuns82
    New Member
    • Mar 2007
    • 58

    #1

    Replacing Accented characters from a String

    Hi all,
    I have to replace accented characters from a input string with
    normal plain text.I have coded as follows.

    String input = "ÄÀÁÂÃ";
    input= input.replaceAl l("[ÀÁÂÄÃ]", "A"); like wise v can do for all.

    output was:
    ************
    AAAAA
    now i want u people to suggest me on the above code n let me know ,s thr any other effective code to replacing accented characters from input string with normal text.???

    Along with this i would like to know the list of accented characters used in french language,so that i can use those while replacing.

    Thanks in Advance,
    sundar.
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by gsuns82
    Hi all,
    I have to replace accented characters from a input string with
    normal plain text.I have coded as follows.

    String input = "ÄÀÁÂÃ";
    input= input.replaceAl l("[ÀÁÂÄÃ]", "A"); like wise v can do for all.

    output was:
    ************
    AAAAA
    now i want u people to suggest me on the above code n let me know ,s thr any other effective code to replacing accented characters from input string with normal text.???

    Along with this i would like to know the list of accented characters used in french language,so that i can use those while replacing.

    Thanks in Advance,
    sundar.
    What's the problem with it?

    Kind regards,
    Dmjpro.

    Comment

    • kreagan
      New Member
      • Aug 2007
      • 153

      #3
      s thr any other effective code to replacing accented characters from input string with normal text.???
      It seems like you need to read about Character class and Unicode.

      Character Class
      Unicode

      If I was writing this character replacement, I would parse the string (character by character) and change accordingly.

      Comment

      Working...