Click to See Complete Forum and Search --> : MySQL cyrillic seach while using UTF8


vuryss
03-23-2009, 02:36 AM
Ok there is the problem:

I made a PHP search engine on my web page and it searches videos in database with UTF8 encoding. 70% of the contents are in cyrillic.

When i search an english word like "Dog" it show every result with "dog" in it no matter if there are capital letters. However when im searching a cyrillic word like "Куче" it show only the results with "Куче" in them -> words like "куче", "кУче", "кучЕ" are excluded.

Is there a way to modify my database or php search engine that it wont make normal and capital cyrillic letter different symbols without changing the UTF8 charset?

Thanks in advance!

PS: Sorry for my english :)

NogDog
03-23-2009, 11:39 AM
Take a look at http://www.charles-reace.com/blog/2008/10/03/utf8-in-php-and-mysql/ and make sure you are using the a "ci" (case-insensitive) utf-8 collation.

vuryss
03-23-2009, 11:50 AM
MySQL with utf8_general_ci
and whole site is written in utf8

NogDog
03-23-2009, 11:56 AM
Do you do the...SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'...query before executing your search queries?

vuryss
03-24-2009, 12:12 AM
Nope, i think i found the problem... i just need 2 convert database from the encoding the side made to standart utf8