21 if(mb_strtolower(SITE_CHARSET) !=
'utf-8')
23 $result = Encoding::convertEncoding($result, SITE_CHARSET,
'utf-8');
26 $result = preg_replace(
'/([^\w\s]|_)/iu',
' ', $result);
28 if(mb_strtolower(SITE_CHARSET) !=
'utf-8')
30 $result = Encoding::convertEncoding($result,
'utf-8', SITE_CHARSET);
33 $result = preg_replace(
'/\s+/i'.BX_UTF_PCRE_MODIFIER,
' ', (
string)$result);
34 $result = trim($result);
35 $result = ToUpper($result);