Howdy, Stranger!

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

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Current version is 2.1.11, released 12 June.

Modification to support UTF-8 replacement

edited March 2011 in Vanilla 2.0 Help
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';


$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.