Java String Accent removeAccents(String textWithAccent)

Here you can find the source of removeAccents(String textWithAccent)

Description

remove Accents

License

LGPL

Declaration

public static String removeAccents(String textWithAccent) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.text.Normalizer;

public class Main {
    public static String removeAccents(String textWithAccent) {
        String normalizeFileName = Normalizer.normalize(textWithAccent, Normalizer.Form.NFD);
        return normalizeFileName.replaceAll("[^\\p{ASCII}]", "");
    }//from  ww  w .  j  a va  2s.  co m
}

Related

  1. removeAccents(final String value)
  2. removeAccents(String input)
  3. removeAccents(String s)
  4. removeAccents(String str)
  5. removeAccents(String text)
  6. removeAccentsAndNonStandardCharacters(String string)
  7. removeAccentuation(String str)
  8. replaceAccent(String strInit)
  9. replaceAccentedChars(StringBuilder buffer)