Fixed error suppressing suggested in r58559 by Tim. Also fixed some warnings and...
[mediawiki.git] / languages / classes / LanguageZh_hans.php
blob2f81960b16d5ab0df25cf8b1d1ed790c5bc13f34
1 <?php
3 /**
4 * @ingroup Language
5 */
6 class LanguageZh_hans extends Language {
7 function hasWordBreaks() {
8 return false;
11 function stripForSearch( $string, $doStrip = true ) {
12 wfProfileIn( __METHOD__ );
14 // Double-width roman characters
15 $s = self::convertDoubleWidth( $string );
17 if ( $doStrip == true ) {
18 // Eventually this should be a word segmentation;
19 // for now just treat each character as a word.
20 // @todo Fixme: only do this for Han characters...
21 $reg = "/([\\xc0-\\xff][\\x80-\\xbf]*)/";
22 $s = self::wordSegmentation( $s, $reg );
25 $s = trim( $s );
27 // Do general case folding and UTF-8 armoring
28 $s = parent::stripForSearch( $s, $doStrip );
29 wfProfileOut( __METHOD__ );
30 return $s;