I've this 4 contacts stored in my android contacts list, it's a SQLite database.
António Meireles
AntÓnio Pinto
Ágata Silva
ágata Pereira
If I execute:
select _id, display_name from raw_contacts where upper(display_name) like upper('%antó%')
I get António Meireles
and not both Antónios.
If I execute:
select _id, display_name from raw_contacts where upper(display_name) like upper('%á%')
I get ágata Pereira
and not both Ágatas.
What is wrong here? Shouldn't the upper()
function make it exactly the same on both sides and return both António
s and Ágata
s?
This is happening to me when I try to make my search case insensitive when accents come into equation. From what I read around it is advised to put both (comparator and string to be compared with) either uppercase or lowercase and both strings would match, but that's not happening in my case.