MySQL uses collations to do string comparison because some characters should match
Exemple:
SELECT 'é' = 'e' COLLATE utf8_unicode_ci;
SELECT 'oe' = 'œ' COLLATE utf8_unicode_ci;
both return true
Now, how can I do the same with quotes (') vs apostrophes (’)
This is not the same character, the proper character to use when writing “it’s” or “l’oiseau” (in french) are both the apostrophe.
The fact is that neither utf8_general_ci or utf8_unicode_ci collate them.
The easy solution is to store everything in quotes and do a replace of all the apostrophes when a user does a search, but it’s wrong.
The real solution would be to create a custom collation based on utf8_unicode_ci and mark both as equivalent, but that requires to edit XML config files and to restart the database, which isn’t always possible.
How would you do it?