How I can use LOCATE ignoring accents on comparison? For instance:
SELECT LOCATE('a', 'João'); -- Fail
>> Currently: 0
>> Need: 3
SELECT LOCATE('ã', 'João'); -- Ok
>> Currently: 3
>> Need: 3
How I can do that? I can’t use LIKE on this case (and it works!).
If you use the
latin1charset, some accents will be ignored. This can have unexpected behaviour on some inputs however, so be sure to test thoroughly.