LanguageYue.php 502 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @ingroup Language
  4. */
  5. class LanguageYue extends Language {
  6. function stripForSearch( $string ) {
  7. wfProfileIn( __METHOD__ );
  8. // eventually this should be a word segmentation
  9. // for now just treat each character as a word
  10. // @fixme only do this for Han characters...
  11. $t = preg_replace(
  12. "/([\\xc0-\\xff][\\x80-\\xbf]*)/",
  13. " $1", $string);
  14. // Do general case folding and UTF-8 armoring
  15. $t = parent::stripForSearch( $t );
  16. wfProfileOut( __METHOD__ );
  17. return $t;
  18. }
  19. }