It looks like Joomla defines some of mb_* functions, but not them all.
In components/com_kunena/class.kunena.php find:
Code:
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding($text) {
$c=0; $b=0;
$bits=0;
$len=strlen($text);
for($i=0; $i<$len; $i++){
$c=ord($text[$i]);
if($c > 128){
if(($c >= 254)) return 'ISO-8859-1';
elseif($c >= 252) $bits=6;
elseif($c >= 248) $bits=5;
elseif($c >= 240) $bits=4;
elseif($c >= 224) $bits=3;
elseif($c >= 192) $bits=2;
else return 'ISO-8859-1';
if(($i+$bits) > $len) return 'ISO-8859-1';
while($bits > 1){
$i++;
$b=ord($text[$i]);
if($b < 128 || $b > 191) return 'ISO-8859-1';
$bits--;
}
}
}
return 'UTF-8';
}
function mb_convert_encoding($text,$target_encoding,$source_encoding=NULL) {
return $text;
}
function mb_substr($str, $start, $lenght=NULL, $encoding=NULL) {
if ($lenght===NULL) $lenght = strlen($str);
return substr($str, $start, $lenght);
}
}
And replace it with:
Code:
if (!function_exists('mb_detect_encoding')) {
function mb_detect_encoding($text) {
$c=0; $b=0;
$bits=0;
$len=strlen($text);
for($i=0; $i<$len; $i++){
$c=ord($text[$i]);
if($c > 128){
if(($c >= 254)) return 'ISO-8859-1';
elseif($c >= 252) $bits=6;
elseif($c >= 248) $bits=5;
elseif($c >= 240) $bits=4;
elseif($c >= 224) $bits=3;
elseif($c >= 192) $bits=2;
else return 'ISO-8859-1';
if(($i+$bits) > $len) return 'ISO-8859-1';
while($bits > 1){
$i++;
$b=ord($text[$i]);
if($b < 128 || $b > 191) return 'ISO-8859-1';
$bits--;
}
}
}
return 'UTF-8';
}
}
if (!function_exists('mb_convert_encoding')) {
function mb_convert_encoding($text,$target_encoding,$source_encoding=NULL) {
return $text;
}
}
if (!function_exists('mb_substr')) {
function mb_substr($str, $start, $lenght=NULL, $encoding=NULL) {
if ($lenght===NULL) $lenght = strlen($str);
return substr($str, $start, $lenght);
}
}