From c457b129c4b06cf12c6d771b0e528485589e3457 Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Mon, 8 Jan 2018 19:15:19 +0100 Subject: [PATCH] Function cutString mit Multibyte Unterstuetzung --- include/functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions.inc.php b/include/functions.inc.php index a531d0bfd..86e4da84f 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -1064,7 +1064,7 @@ function cutString($string, $limit, $placeholderSign = '', $keepFileextension = if ($keepFileextension) { $extension = '.'.pathinfo($string, PATHINFO_EXTENSION); - $offset = $offset + strlen($extension); + $offset = $offset + mb_strlen($extension); } if(($limit - $offset) < 0) { @@ -1073,7 +1073,7 @@ function cutString($string, $limit, $placeholderSign = '', $keepFileextension = if(strlen($string) > ($limit - $offset)) { - return substr($string, 0, ($limit - $offset)).$placeholderSign.$extension; + return mb_substr($string, 0, ($limit - $offset)).$placeholderSign.$extension; } else {