Page 1 of 1

Problem with Greek search

Posted: Mon Jan 29, 2007 8:38 pm
by samplist
Hello, i have found cmsms absolutely brilliant! I have developed a site and now that i'm in the end of it
i realized that "search" isn't working with greek. I tried various encoding for my mysql database but that
didn't do anything. The characters inside mysql always appear like chinese @#$@#$!@ and this is obviously
why the search doesn't work. Any help will be appreciated, i hate to go to a different cms since this is the best i found.

php 4.4.1
mysql 5.0.15

Re: Problem with Greek search

Posted: Tue Jan 30, 2007 7:07 am
by samplist
After a little search i found that this problem exists sometime know...
I've managed to fix this problem folowing the instructions from this post
http://forum.cmsmadesimple.org/index.ph ... 5msg_id%25

1. Always connect to MySQL with utf8. Patch the include.php file; add this line:
    $db->Execute('set names utf8');
after line
    $db =& $gCms->GetDB();

2. In the file action.dosearch.php i replaced this line :

$ary[] = "word = " . $db->qstr(htmlentities($word, ENT_COMPAT, 'UTF-8'));
with this line:
$ary[] = "word = " . $db->qstr($word, ENT_COMPAT, 'UTF-8');

3. I'm not using fckeditor.

Where can i post this so that developers should see it?
I think this is a problem that can be solved

Re: Problem with Greek search

Posted: Wed Jan 31, 2007 11:56 am
by samplist
i'm now using xinha as the default editor and everything works fine.
so anyone with the same problem should know, thanks.