22 if(mb_strtolower(SITE_CHARSET) !=
'utf-8')
24 $result = Encoding::convertEncoding($result, SITE_CHARSET,
'utf-8');
27 $result = preg_replace(
'/([^\w\s]|_)/iu',
' ', $result);
29 if(mb_strtolower(SITE_CHARSET) !=
'utf-8')
31 $result = Encoding::convertEncoding($result,
'utf-8', SITE_CHARSET);
34 $result = preg_replace(
'/\s+/i'.BX_UTF_PCRE_MODIFIER,
' ', $result);
35 $result = trim($result);
36 return ToUpper($result);