mysql - Diacritic Sensitive Search PHP -
hlo...
i've been making spell checker of punjabi. working fine except diacritics of punjabi language. e , é, punjabi has diacritics ਸ , ਸ਼. problem when search in database, considers word ਸ਼ , ਸ same. database stored words in utf-8 format. using collation utf8_unicode_ci database , tables well.
mysql_query("set charset utf8"); $exists = mysql_query("select count(word) unicode word = '$str'"); if count 0, says word wrong. $str word. when try search, says word both ਸ , ਸ਼ correct. word ਸ਼ correct.
i've tried change collation utf8_bin collate utf8_bin, says both words wrong ਸ , ਸ਼. i've tried utf8_general_ci , changing collation of table , database.
it either says both incorrect, or both correct. 1 of them correct.
my main problem diacritic sensitive search doesn't work utf8_bin either...
plzz help..thxx in advance....
select count(word) unicode binary word = '$str' the binary keyword causes mysql direct bit-by-bit comparison.
Comments
Post a Comment