After some tests I’ve a small preleminary result, but I can not really explain why it works :
in line 147 or AjaxSearch.php I changed :
if ($needsConvert) {
$result = mb_convert_encoding($result, "UTF-8");
}
to
if ($needsConvert) {
$result = mb_convert_encoding($result, "UTF-8");
} else {
$result = utf8_decode($result);
}
So to make it work I had to decode utf8. It’s strange because all my site it utf-8 encoded..
I’ve also figured out a new *encoding* problem : when writing articles with modx, the content are not the same for titles, longtitles, etc... and content, because modx uses FCKEditor for the content and FCK *html encodes* special chars.
Ajax Search (and probably all olders versions of search snippets) does not search html encoded chars.
Example : the word :
écoute is stored in the database :
écoute...