case 'ucfirst':
// there's no mb_ucfirst, so emulate it
if ($mbstring === 2) {
- $enc = mb_detect_encoding($args[1]);
+ $enc = LANG_CHARSET;
return mb_strtoupper(mb_substr($args[1], 0, 1, $enc), $enc) . mb_substr($args[1], 1, mb_strlen($args[1], $enc), $enc);
} else {
return ucfirst($args[1]);
if ($sql && is_array($sql)) {
foreach($sql AS $key => $row) {
if (function_exists('mb_strimwidth')) {
- $comment = mb_strimwidth(strip_tags($row['comment']), 0, $max_chars, " [...]", mb_detect_encoding($row['comment']));
+ $comment = mb_strimwidth(strip_tags($row['comment']), 0, $max_chars, " [...]", LANG_CHARSET);
} else {
$comments = wordwrap(strip_tags($row['comment']), $max_chars, '@@@', 1);
$aComment = explode('@@@', $comments);
if (function_exists( 'mb_strimwidth')) {
$pos = 0;
$parts = array();
- $enc = mb_detect_encoding($comment);
+ $enc = LANG_CHARSET;
$comment_len = mb_strlen($comment, $enc);
while ($pos < $comment_len) {
$part = mb_strimwidth($comment, $pos, $wordwrap, '', $enc);