[drupal-devel] [bug] Search module UTF-8 compatibility

Poetro drupal-devel at drupal.org
Thu Jul 14 10:40:40 UTC 2005


Issue status update for 
http://drupal.org/node/26688
Post a follow up: 
http://drupal.org/project/comments/add/26688

 Project:      Drupal
 Version:      4.6.0
 Component:    search.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Poetro
 Updated by:   Poetro
 Status:       patch

The search module contains some bugs when using native UTF-8 database
connection. To correct this some of the strtolower function should be
changed to some UTF-8 compatible versions of the function like
mb_strtolower.
The following lines should be changed:
398:
-            $word = strtolower($word);
+            $word = mb_strtolower($word, 'UTF-8');
493:
-      $arguments[] = str_replace('?', '%', strtolower($word));
+      $arguments[] = str_replace('?', '%', mb_strtolower($word,
'UTF-8'));
497:
-      $arguments[] = strtolower($word);
+      $arguments[] = mb_strtolower($word, 'UTF-8');




Poetro




More information about the drupal-devel mailing list