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

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -