Assuming you still have problems after changing your charset into iso-8859-1, put following code into line 46 of
includes/ languages/german.php.
Notes: 1. Set back your charset to utf-8.
2. Be sure to use your override language file.
3. As long as everything works fine with the iso-8859- leave it like it is.
PHP Code:
/**
* This is an Unicode aware replacement for str_word_count()
* $charlist has to be ascii or utf-8
* does not use locale information
* public domain
*/
function utf8_str_word_count($string,$format=0,$charlist='') {
$array = preg_split("/[^'\-A-Za-z".$charlist."]+/u",$string,-1,PREG_SPLIT_NO_EMPTY);
switch ($format) {
case 0:
return(count($array));
case 1:
return($array);
case 2:
$pos = 0;
foreach ($array as $value) {
$pos = utf8_strpos($string,$value,$pos);
$posarray[$pos] = $value;
$pos += utf8_strlen($value);
}
return($posarray);
}
}
Bookmarks