From: Michael Vogel Date: Sun, 15 Jun 2014 18:48:15 +0000 (+0200) Subject: App.net: Count had to be done with correct charset X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e5a18640897a6b24d4c576ac6c4c1cebdbbdad3a;p=friendica-addons.git App.net: Count had to be done with correct charset --- diff --git a/appnet/appnet.php b/appnet/appnet.php index db595c99..85379e56 100644 --- a/appnet/appnet.php +++ b/appnet/appnet.php @@ -365,7 +365,7 @@ function appnet_create_entities($a, $b, $postdata) { krsort($entities); foreach ($entities AS $entity) { - if (iconv_strlen($text) >= $entity["pos"] + $entity["len"]) { + if (iconv_strlen($text, "UTF-8") >= $entity["pos"] + $entity["len"]) { $pre = iconv_substr($text, 0, $entity["pos"], "UTF-8"); $post = iconv_substr($text, $entity["pos"] + $entity["len"], 1000000, "UTF-8");