forked from friendica/friendica-addons
App.net: Count had to be done with correct charset
This commit is contained in:
parent
86b958e796
commit
e5a1864089
1 changed files with 1 additions and 1 deletions
|
@ -365,7 +365,7 @@ function appnet_create_entities($a, $b, $postdata) {
|
||||||
|
|
||||||
krsort($entities);
|
krsort($entities);
|
||||||
foreach ($entities AS $entity) {
|
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");
|
$pre = iconv_substr($text, 0, $entity["pos"], "UTF-8");
|
||||||
$post = iconv_substr($text, $entity["pos"] + $entity["len"], 1000000, "UTF-8");
|
$post = iconv_substr($text, $entity["pos"] + $entity["len"], 1000000, "UTF-8");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue