UI > search > Bug (done?)

Searching for "Поддръжка" does not work/#1368

Summary

done?
Jul 12, 2006
100%
Jul 12, 2006 / pixtur
Nov 17, 2008 / pixtur
 

Attached files

No files uploaded
 
from http://www.streber-pm.org/phpBB2/viewtopic.php?t=205&highlight=

I'm using streber v 0.063 with my native language - "cyrillic". All is working fine, but the search is not working when I use cyrillic letters.

This is what I got for searching "Поддръжка" (support on English):

Quote:

No search results for `0`

sorry. Could not find anything.

Due to limitations of MySQL fulltext search, searching will not work for...
  • words with 3 or less characters
  • Lists with less than 3 entries
  • words containing special charaters

It seems for me that this is related to the character conversion.

P.S.
Maybe it is not a bug, but ... just to share it

\\

Issue report

Minor
Not available
WinXP / Firefox 1.5
v0.061
 

7 Comments

pixtur:Don't know what to do about this one...

6 years ago

Help needed.

array:

4 years ago

This issue exists because of using Unicode (2bytes encoding).

so I replaced original code in /std/common.inc.php
with this one:
function asMatchString($str) {
    return preg_replace("/[\\\<\>\`_\"]/",,$str);//preg_replace("/[^0-9a-z_\*! ]/i",,strtolower($str));
}

This is just temporary solution for me. And it works from time to time :D

pixtur:interessting...

4 years ago (2. update 4 years ago)

Sounds like a good patch for v0.081

pixtur:ok, changed the code, like you suggested

4 years ago


array:

4 years ago

Ooops... post filter cut regular expression in post above.
Trying to post it again.

from /std/common.inc.php

function asMatchString($str) {
    return preg_replace("/[\\\<\>\`_\"]/",'',$str);
}

array:

4 years ago

Hm...
so just use it:
function asMatchString($str) {
    return asCleanString($str);
}

pixtur:ah... right...

4 years ago

I already understood that the regex was rendered invalid because of stripped backslashes. :) But your code is more optimal...