Autocomplete edit text does not work with accents

0

I have an autocomplete edit text but it does not match between words without and with an accent, I would like that when putting some word without an accent, I will return the matching options even if they have an accent.

    
asked by tocho2301 17.04.2018 в 22:09
source

1 answer

0

In java you have the normalizer that converts your string with accents to one without accents, how to use it I attach it here:

string = Normalizer.normalize(string, Normalizer.Form.NFD);
string = string.replaceAll("[^\p{ASCII}]", "");

so that in string you put what you want to normalize so that it autocompletes without accents.

    
answered by 18.04.2018 в 09:46