Skip to content

Instantly share code, notes, and snippets.

@danilomiranda
Created June 11, 2015 20:44
Show Gist options
  • Save danilomiranda/acfcf44ae09552698c6a to your computer and use it in GitHub Desktop.
Save danilomiranda/acfcf44ae09552698c6a to your computer and use it in GitHub Desktop.
Java mudar caracteres acentuados para não acentuados
public class Main {
public static void main(String[] args) {
final String input = "Danilo Cássio Gonçalves";
System.out.println(Normalizer.normalize(input, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", ""));
}
}
@edgardleal
Copy link

Great !
If you can, put the imports. I don't know where is the class Normalizer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment