Created
June 11, 2015 20:44
-
-
Save danilomiranda/acfcf44ae09552698c6a to your computer and use it in GitHub Desktop.
Java mudar caracteres acentuados para não acentuados
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}]", "")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great !
If you can, put the imports. I don't know where is the class Normalizer.