Priority: Urgent
Current State: Closed
Released In: n/a
Target Release:
There are some unneeded Encode:: calls in
my_substr
. I've made them conditional, and metacomments now appear to work, basic testing with some Arabic Lorum Ipsum text. Without the change, there are wide character errors when posting a comment.
diff --git a/lib/Foswiki/Plugins/MetaCommentPlugin/Core.pm b/lib/Foswiki/Plugins/MetaCommentPlugin/Core.pm
index ecbbdc7..b82a313 100644
--- a/lib/Foswiki/Plugins/MetaCommentPlugin/Core.pm
+++ b/lib/Foswiki/Plugins/MetaCommentPlugin/Core.pm
@@ -811,9 +811,9 @@ sub my_substr {
my $charset = $Foswiki::cfg{Site}{CharSet};
- $string = Encode::decode($charset, $string);
+ $string = Encode::decode($charset, $string) unless $Foswiki::UNICODE;
$string = substr($string, $offset, $length);
- $string = Encode::encode($charset, $string);
+ $string = Encode::encode($charset, $string) unless $Foswiki::UNICODE;
return $string;
}
--
GeorgeClark - 21 Jul 2015
my_substr
has been removed completely for F-2
--
MichaelDaum - 21 Jul 2015