http://bugzilla.spamassassin.org/show_bug.cgi?id=4621





------- Additional Comments From [EMAIL PROTECTED]  2005-10-11 23:19 -------
This is very confusing. I'm flailing a bit, but Tom, here are two patches to try
to see if either one or both in combination makes your crash go away. If any of
them work then we can try to figure out how to avoid the crash without
reintroducing some old bugs.

Both of these are in HTML.pm. The first one is to replace the line 

   $self->SUPER::parse(pack('C0A*', $text));

with

    $self->SUPER::parse($text);

The other I have here in diff from from a comment in bug 4046 where it was
considered but not used. You may have to apply it by hand if tabs or line breaks
got garbled in the copy and paste.

Index: lib/Mail/SpamAssassin/HTML.pm
===================================================================
--- lib/Mail/SpamAssassin/HTML.pm       (revision 178588)
+++ lib/Mail/SpamAssassin/HTML.pm       (working copy)
@@ -107,6 +107,15 @@
                ],
                marked_sections => 1);
 
+  # enable UTF-8 mode,
+  # http://search.cpan.org/~gaas/HTML-Parser-3.45/Parser.pm#$p-%3Eutf8_mode ,
+  # if we're running perl 5.8 and HTML::Parser supports it.  bug 4046.
+  if ($] >= 5.008 && $self->can("utf8_mode")) {
+    if (!eval { $self->utf8_mode(); 1; }) {
+      dbg ("html: failed to enable UTF-8 mode (perl ver $] h:p ver
$HTML::Parser::VERSION)");
+    }
+  }
+
   $self;
 }
 




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to