Created
May 1, 2014 13:14
-
-
Save ahmednasir91/0cf805b5843b295e8959 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<collation name="utf8_arabic" id="100"> | |
<rules> | |
<reset>\u0627</reset> | |
<i>\u0622</i> | |
<i>\u0623</i> | |
<i>\u0625</i> | |
</rules> | |
<rules> | |
<reset>\u0647</reset> | |
<i>\u0629</i> | |
</rules> | |
<rules> | |
<reset>\u0649</reset> | |
<i>\u064a</i> | |
</rules> | |
</collation> |
thanks for this gist.
maybe you should add the rule for Ya2 as well
resetting ي and ى
<rules>
<reset>\u064A</reset>
<i>\u0649</i>
</rules>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mzeidhassan most likely you worked things out months ago, I am just adding the answer to your question in case someone comes here looking for a solution.
You need to add the collation to a file called 'Index.xml'. Its location varies from system to another, you can find it on your system by querying the 'information_schema' database with the following query:
Backup the file, scroll to element
<charset name="utf8">
and add the collation there. It will look like the following:My collation here named 'utf8_arabic_ci' is the same as Ahmed Nasir, I just added the part to ignore tashkil. You will have to restart MySQL, and then change the collation of the column with a query like:
For more information you can check my blog post on this subject:
arabic-case-insensitive-in-database-systems
And the MySQL documentation about adding a new collation