]> diplodocus.org Git - nmh/commitdiff
Fix for bug #41618: Supply charset to w3m when converting text/html parts.
authorKen Hornstein <kenh@pobox.com>
Tue, 18 Feb 2014 17:38:06 +0000 (12:38 -0500)
committerKen Hornstein <kenh@pobox.com>
Tue, 18 Feb 2014 17:38:06 +0000 (12:38 -0500)
docs/contrib/replyfilter

index cbb8fff12ff2817bce10573466abdbff3d5124d6..7f5b44752660a2bafaae518e38def7f802d57418 100755 (executable)
@@ -68,11 +68,11 @@ $outcharset = 'utf-8';
 $maxcolwidth = 78;
 
 #
 $maxcolwidth = 78;
 
 #
-# Out HTML converter program & arguments
+# Out HTML converter program & arguments. charset will be appended
 #
 
 @htmlconv = ('w3m', '-dump', '-cols', $maxcolwidth - 2, '-T', 'text/html',
 #
 
 @htmlconv = ('w3m', '-dump', '-cols', $maxcolwidth - 2, '-T', 'text/html',
-            '-O', $outcharset);
+            '-O', $outcharset, '-I');
 
 
 die "Usage: $0 Content-type content-transfer-encoding quote-prefix\n"
 
 
 die "Usage: $0 Content-type content-transfer-encoding quote-prefix\n"
@@ -400,7 +400,8 @@ sub process_html (*$$;$)
                # Exec our converter
                #
 
                # Exec our converter
                #
 
-               exec (@htmlconv) ||
+               my @conv = (@htmlconv, $charset);
+               exec (@conv) ||
                                die "Unable to exec $filterprogram: $!\n";
        } else {
                die "Fork for $htmlconv[0] failed: $!\n";
                                die "Unable to exec $filterprogram: $!\n";
        } else {
                die "Fork for $htmlconv[0] failed: $!\n";