Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Important security fix: 2.1.10, released 4 May.

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';

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.