From: Michael Vogel Date: Sun, 15 Jun 2014 18:46:56 +0000 (+0200) Subject: shortening message: Solved issue with non latin characters X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ac78989fc9bb445c1f5ebc3e65a25e1932f44161;p=friendica.git shortening message: Solved issue with non latin characters --- diff --git a/include/plaintext.php b/include/plaintext.php index 58214daa16..3a81470b68 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -111,7 +111,7 @@ function shortenmsg($msg, $limit, $twitter = false) { $msg = ""; $recycle = html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8'); foreach ($lines AS $row=>$line) { - if (strlen(trim($msg."\n".$line)) <= $limit) + if (iconv_strlen(trim($msg."\n".$line), "UTF-8") <= $limit) $msg = trim($msg."\n".$line); // Is the new message empty by now or is it a reshared message? elseif (($msg == "") OR (($row == 1) AND (substr($msg, 0, 4) == $recycle)))