[bug #14704] HTML mail does not get its charset converted (patch included)

2005-10-04 01:46:12


                 Summary: HTML mail does not get its charset converted (patch
                 Project: MHonArc
            Submitted by: bsmirnov
            Submitted on: Tue 10/04/05 at 14:45
                Category: Mail Parsing
                Severity: 3 - Normal
              Item Group: Incorrect Behavior
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: All
            Perl Version: 5.8.7
       Component Version: 2.6.15
           Fixed Release: 



When text/html part of a message is being archived, and is in a charset
different then charset of the archive, it is placed on a message page without
charset conversion.
Example: when TextEncode is
"cp1251;MHonArc::Encode::from_to;MHonArc/" or 
"utf-8; MHonArc::UTF8::to_utf8; MHonArc/", and HTML part is in koi8-r
charset. The character set conversion does not happen.

Here is the fix:

---    2005-10-04 14:42:17.762886100 +0600
+++ 2005-10-04 14:43:00.701769100 +0600
@@ -1372,7 +1372,7 @@
     # If HTML, check <meta http-equiv=content-type> tag since it
     # can be different than what is specified in the entity header.
     if (($subtype eq 'html' || $subtype eq 'x-html') &&
-       ($body =~ m/(<meta\s+http-equiv\s*=\s*['"]?
+       ($$body =~ m/(<meta\s+http-equiv\s*=\s*['"]?
                     content-type\b[^>]*>)/xi)) {
        my $meta = $1;
        if ($meta =~ m/\bcharset\s*=\s*['"]?([\w\.\-]+)/i) {


Reply to this item at:


  Message sent via/by Savannah

To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the

<Prev in Thread] Current Thread [Next in Thread>