Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

srtolower function problem

edited October 2007 in Vanilla 1.0 Help
Hi to all.

I'am from Russia, so I must use unicode UTF8. But there is one big problem - strtolower PHP function does not understands unicode. That is why, for exapmle, search.php not works with russian keywords (because BreakKeywords function in Vanilla uses strtolower function).

There is mb_strtolower since PHP 4.3 version, witch works with multi byte strings. But it is not build-in fuction and it's avaliable only as extention (php_mbstring.dll).

There is one way to solve this problem "transparently".

Somewhere in begin of initialising Vanilla core write:

if (!function_exists('mb_strtolower')) { function mb_strtolower($s) { return strtolower($s); } }

And after that change "strtolower" to 'mb_strtolower' at every place in Vanilla code.

In case if PHP has php_mbstring.dll - Vanilla will works correctly with unicode strings. Another case - will use strtolower function.

P.S. Thanks for Vanilla!
This discussion has been closed.