Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

Follow Us


Modification to support UTF-8 replacement

edited March 2011 in Questions
This discussion is related to the Civil Tongue addon.
I wanted support for UTF-8 so in file [class.civiltongue.plugin.php]
I replaced inside
private function GetPatterns() {
the line

$Patterns[] = '/\b' . preg_quote(ltrim(rtrim($Word))) . '\b/is';

with

$Patterns[] = '/' . preg_quote(ltrim(rtrim($Word))) . '/uis';

Now it replaces UTF-8 words . I don't know why the "\b" existed.

A problem with my modification is that although it ignores case [ΤΕΣΤ=τεστ=ΤεΣτ] it doesn't consider [τεστ and τέστ] the same.

Any ideas on how to fix that?
Sign In or Register to comment.