Following this answer, I have used the MySQL command
SET NAMES utf8;
hoping that all these 4 cases of MySQL FULLTEXT search would work :
If
text = 'lápiz'
,1)
SELECT id, text FROM mytable WHERE MATCH (text) AGAINST ('lapiz' IN NATURAL LANGUAGE MODE)
should work2)
SELECT id, text FROM mytable WHERE MATCH (text) AGAINST ('lápiz' IN NATURAL LANGUAGE MODE)
should workIf
text = 'lapiz'
,3)
SELECT id, text FROM mytable WHERE MATCH (text) AGAINST ('lapiz' IN NATURAL LANGUAGE MODE)
should work4)
SELECT id, text FROM mytable WHERE MATCH (text) AGAINST ('lápiz' IN NATURAL LANGUAGE MODE)
should work
Strangely, 1) and 2) don't work (No result found!), but 3) and 4) work (lapiz
is found).
How to have a really diacritic insensitive MySQL Full-Text search?
How do the collations work with MySQL Full-Text search feature?
PS: this is not a duplicate of the previously linked question, nor of this question. The difference seems to be linked with the use of Full-Text search MATCH(...) AGAINST (...) instead of LIKE.