1
the autolink feature in "wordbook" module doesnt work for unicode(utf-8) charset when the $search_term have more than 3 characters. i dont know about the pattern of this function.
this is the code from wordbook/entry.php
le="color: #000000"><?php // singular $term_q = preg_quote($term, '/'); $search_term = "/b$term_qb/i"; $replace_term = "<span><b><a style='color: #2F5376; text-decoration: underline; ' href='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/entry.php?entryID=".ucfirst($entryID)."'>".$term."</a></b></span>"; $parts[$key] = preg_replace($search_term, $replace_term,$parts[$key]);
for example with this term it works fine:
$test1=preg_replace("/\bعلی\b/i", "change ok","علی");
but if i use a more than 3 characters term it is fail to find that term:
$test2=preg_replace("/\bعلیب\b/i", "change NOT ok","علیب");
phppp get me this answer:
Quote:
It is not necessarily a pre_replace - unicode problem, but more like a word boundary for multibyte language problem.
ANYONE CAN HELP?