On Monday September 28 2009 04:58:42 MySQL Student wrote:
> Mark suggested in the bugzilla update that I "change SpamAssassin to
> add 'use utf8' into code generated from rules when it sees it is being
> run with a pre-5.8 version of perl." How do I do this for the time
> being?
Try the following (for SA 3.2.5). I haven't tested it, but according
to the perl docs this is what is missing:
--- lib/Mail/SpamAssassin/Plugin/Check.pm (revision 819489)
+++ lib/Mail/SpamAssassin/Plugin/Check.pm (working copy)
@@ -271,10 +271,14 @@
my $evalstr = $self->{evalstr};
+ my $needed_utf8_pragma = '';
+ $needed_utf8_pragma = 'use utf8;' if $] >= 5.006 && $] < 5.008;
+
# generate the loop that goes through each line...
$evalstr = <<"EOT";
{
package $package_name;
+ $needed_utf8_pragma;
$self->{evalstr2}
Mark