LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File patch-utf8 of Package spamassassin (Project home:pheinlein)

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