Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should try changing the collation setting in your MySQL DB.</p> <p>There are three that seem to come up often in discussions of this topic:</p> <ol> <li><p><code>utf8_general_ci</code></p></li> <li><p><code>utf8_unicode_ci</code></p></li> <li><p><code>utf8_bin</code> ← You probably want this one.</p></li> </ol> <p>I have found that #3 will match accents in search. <a href="https://stackoverflow.com/questions/2344118/utf-8-general-bin-unicode">This answer</a> gives a bit of background on the differences, but it doesn't mention the fact that <code>utf8_bin</code> is also sensitive to accents. You might want to try all three so you can test for yourself if it's working with the language/script you're dealing with.</p> <p>To be really sure that things are going to match correctly, you will have to look into Unicode Normalization as well, which is really a whole different ball of wax. It is possible that your user could type in a query with an accent in a different normalization from the one your data is stored in, and thus it might fail to match. I've had that problem with Sqlite, not sure if it applies to MySQL or not.</p> <p>FWIW, here's a <code>CREATE TABLE</code> I'm currently using, where I needed to match accents, that is setting the COLLATION:</p> <pre><code>CREATE TABLE `glosses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `morphemes` varchar(255) CHARACTER SET utf8 DEFAULT NULL, `labels` varchar(255) CHARACTER SET utf8 DEFAULT NULL, `phrase_id` int(11) DEFAULT NULL, `nth_word` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; </code></pre> <p>You can see the <code>COLLATE=utf8_bin</code> tacked on at the end.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload