2006/4/7 14:11
irmtfan
Module Developer
Posts: 3419
Since: 2003/12/7
// singular $term_q = preg_quote($term, '/'); $search_term = "/b$term_qb/i"; $replace_term = ".XOOPS_URL."/modules/".$xoopsModule->dirname()."/entry.php?entryID=".ucfirst($entryID)."'>".$term.""; $parts[$key] = preg_replace($search_term, $replace_term,$parts[$key]);
It is not necessarily a pre_replace - unicode problem, but more like a word boundary for multibyte language problem.
2006/6/14 14:56
mondarse
Just popping in
Posts: 96
Since: 2003/2/3 1
2006/6/14 16:35
leostotch
Posts: 76
Since: 2006/4/1 1
u (PCRE_UTF8)This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern strings are treated as UTF-8. This modifier is available from PHP 4.1.0 or greater on Unix and from PHP 4.2.3 on win32. UTF-8 validity of the pattern is checked since PHP 4.3.5.
$search_term = "/b$term_qb/i"; // change to $search_term = "/b$term_qb/iu";
2006/6/14 17:09
2006/6/17 21:37
2007/10/2 0:41
rasme
Posts: 39
Since: 2005/5/9 6
Advanced Search
426 user(s) are online (288 user(s) are browsing Support Forums)
Members: 0
Guests: 426