Here you can find the source of deAccent(String str)
private static String deAccent(String str)
//package com.java2s; //License from project: Open Source License import java.text.Normalizer; import java.util.regex.Pattern; public class Main { private static String deAccent(String str) { String nfdNormalizedString = Normalizer.normalize(str, Normalizer.Form.NFD); Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); return pattern.matcher(nfdNormalizedString).replaceAll(""); }/*from ww w . j a v a 2 s. co m*/ public static String normalize(String name) { return normalize(name, -1); } public static String normalize(String name, int limit) { String normalized = deAccent(name).replaceAll("[^0-9a-zA-Z\\$_]", ""); return limit > 0 && normalized.length() > limit ? normalized.substring(0, limit - 1) : normalized; } }