]> git.mxchange.org Git - friendica-addons.git/commitdiff
App.net: Count had to be done with correct charset
authorMichael Vogel <icarus@dabo.de>
Sun, 15 Jun 2014 18:48:15 +0000 (20:48 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 15 Jun 2014 18:48:15 +0000 (20:48 +0200)
appnet/appnet.php

index db595c996ace365fe611de812b243b5de44c416f..85379e5690d3ef31711f35b94e95e751c93d3b31 100644 (file)
@@ -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");