if (!in_array(strtolower($word),$keywords_array)) $keywords_array[] = $word;
to
if (!in_array($word = strtolower($word),$keywords_array)) $keywords_array[] = $word;
The above code stores the keywords in lowercase format inside $keywords_array.
This is because in_array() can only handle ANSI upper/lower casing
So Nibbler's solution makes shure $word is lowercase in any way BUT... since 1.4.x is UTF8 based strtolower() fails since it can't handle multibyte strings. Therefore the new utf_strtolower() function (and some others) are added to handle them even if the PHP functionality mb_* isn't available.
All keywords and keyword searching must be done in lowercase, especialy when you move on to MySQL 5.x since query searching on 'fôo' doesn't find 'fÔo'.
MySQL 4.0.x is no problem since that only understands ANSI and is thereby case-insensitive. Anything else (including Postgre, Oracle, etc.) is case-sensitive.
That's why i re-opened the topic, the issue is wider then that small fix especialy now that there's MySQL 5 support