Search in Russian text

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Registered User
Posts: 1
Joined: Mon Apr 15, 2002 10:03 pm

Search in Russian text

Post by AndyX »

The search engine of phpBB2 dosn't work with russian text in topics. How can i fix this problem? :roll:
User avatar
Former Team Member
Posts: 4032
Joined: Wed Jan 16, 2002 7:05 am
Location: Seattle, WA, US

Post by chAos »

a guy made a post about the same problem but with hebrew.

a mystery for me. :?: :?: :?:
Registered User
Posts: 3
Joined: Thu Apr 25, 2002 1:30 pm

Post by RomanZu »

I have solved a problem of russian search. :)

In function_search.php there is a function split_words which does not pass Russian letters because of regular expression:
preg_match_all('/(\*?[a-z0-9]+\*?)|\b([a-z0-9]+)\b/', $entry, $split_entries);

I have replaced this line on:
preg_match_all('/(\*?[а-яa-z0-9]+\*?)|\b([а-яa-z0-9]+)\b/', $entry, $split_entries);

I.e in 2 places I have added the first and last letter of the Russian alphabet in expression

I Think that with other languages it too should work
Registered User
Posts: 3
Joined: Thu Apr 25, 2002 1:30 pm

Post by RomanZu »

In the previous message forum instead of letters has substituted unicode code.

I.t. instead of &#1072 and &#1103 necessary to insert letters.
(I hope this time all will be OK)
Registered User
Posts: 1
Joined: Fri Jul 19, 2002 1:08 pm

Post by Rebelqwe »

I have this fix but Russian search still not work.

function split_words(&$entry, $mode = 'post')
$rex = ( $mode == 'post' ) ? "/\b(\w[\w']*\w+|\w+?)\b/" : '/(\*?[а-яa-z0-9]+\*?)|\b([а-яa-z0-9]+)\b/';
preg_match_all($rex, $entry, $split_entries);

return $split_entries[1];
Registered User
Posts: 9
Joined: Mon Aug 26, 2002 10:09 am
Location: Russia

Post by gooRu »

Sorry! Still not work!
Last edited by gooRu on Mon Aug 26, 2002 3:41 pm, edited 2 times in total.
User avatar
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

Proven Offensive Security Expertise. OSCP - GXPN
Registered User
Posts: 51
Joined: Thu Aug 01, 2002 7:56 am

Post by puzo »

had the same thing with Hebrew on version 2.01 (but im not that guy)


Return to “2.0.x Support Forum”