ive changed to PHP 5.3 which I don't think is an issue but get this error Notice: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in here is the code: $upper_string = preg_replace("!(^|[^\p{L}'])([\p{Ll}])!eS" . Smarty::$_UTF8_MODIFIER, "stripslashes('\\1').mb_convert_case(stripslashes('\\2'),MB_CASE_UPPER, '" . addslashes(Smarty::$_CHARSET) . "')", $string);