From 882eb838b61b606e067d738a54875b6be58fd4d6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 5 Aug 2004 06:31:42 +0000 Subject: [PATCH] Fix for UTF-8 search when system locale is set to Latin-1 [ 961069 ] BUG and FIX: search doesn't work with some UTF-8 chars Moves the strtolower() on the input search terms into Language::stripForSearch() where the correct version already exists for LanguageUtf8. --- includes/SearchEngine.php | 2 +- languages/Language.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index 252725614e..a9f20c4345 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -305,7 +305,7 @@ class SearchEngine { $lc = SearchEngine::legalSearchChars() . "()"; $q = preg_replace( "/([()])/", " \\1 ", $this->mUsertext ); $q = preg_replace( "/\\s+/", " ", $q ); - $w = explode( " ", strtolower( trim( $q ) ) ); + $w = explode( " ", trim( $q ) ); $last = $cond = ""; foreach ( $w as $word ) { diff --git a/languages/Language.php b/languages/Language.php index c7d39df336..f52ac7dbc8 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1757,7 +1757,7 @@ class Language { # Some languages have special punctuation to strip out # or characters which need to be converted for MySQL's # indexing to grok it correctly. Make such changes here. - return $in; + return strtolower( $in ); } function firstChar( $s ) { -- 2.20.1