[drupal-devel] [bug] search.module doesn't search non-english words without mbstring php-module

edhel drupal-devel at drupal.org
Mon Mar 28 05:45:11 UTC 2005

Issue status update for http://drupal.org/node/19575

 Project:      Drupal
 Version:      4.5.2
 Component:    search.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  edhel
 Updated by:   edhel
 Status:       active

Search in Drupal work with national non-english words only with such
1) php-module mbstring is switched on
2) php configured with mbstring.func_overload = 7 (or at least 2)
3) php configured with mbstring.internal_encoding "UTF-8"
Cause: in search.module there is used strtolower() which incorrectly
work UTF-8 (without configured mbstring).
Options 2-3 can be configured in .htaccess. Also these options can be
replaced by other solution: replacing of all strtolower() to
mb_strtolower() in search.module file.
This "feature" is also present in 4.6 RC1.
IMHO it must be fixed in some way or DOCUMENTED IN INSTALL.TXT AND IN
HANDBOOK (in "installation" section).
Notice: with 2-3 options there will be happen some warnings in Drupal:
1) in includes/menu.inc:910 (see: http://drupal.org/node/11758)
2) in modules/user.module:214. For correct work I replaced:

if (ereg("[^\x80-\xF7 [:alnum:]@_.-]", $name)) return t('The username
contains an illegal character.');

by code:

if (ereg("[^\\x80-\\xF7 [:alnum:]@_.-]", $name)) return t('The username
contains an illegal character.');


More information about the drupal-devel mailing list