Unicode String Matching

I want to match two strings with Unicode encoding in Java. I want to map something like:

"asdfeo"
"ásdfeó"

How can I return 0 in a method compareTo()?


EDIT:

When I enter a line into the autocomplete view without diacritics (for some reason I don’t have a keyboard to write these diacritics), I want to see sentences between objects with diacritics between autocomplete. That is why I want to overwrite the method compareTo().

+3
source share
1 answer

What you are looking for is the Collator API.

+5
source

All Articles