summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-02-24 00:20:45 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2016-02-24 00:20:45 (GMT)
commitae8573b28d37209891360c94bffeb7a64a7de996 (patch)
tree2c4455f3e98cca3e49d5bc73bd9f752ce43f67ad
parentf23a9ff49f62351aa7fb25431400df1d3ed75ca7 (diff)
downloadtip-bot-ae8573b28d37209891360c94bffeb7a64a7de996.zip
tip-bot-ae8573b28d37209891360c94bffeb7a64a7de996.tar.gz
tip-bot-ae8573b28d37209891360c94bffeb7a64a7de996.tar.bz2
tip-bot-ae8573b28d37209891360c94bffeb7a64a7de996.tar.xz
robotfmt: use MIME::EncWords instead of Encode('MIME-Header')HEADmaster
MIME-Header seems to have changed so that it unconditionally encodes the entire contents of the header. This is not what we want, so instead use the MIME::EncWords module. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rwxr-xr-xrobotfmt.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/robotfmt.pl b/robotfmt.pl
index 9542bdf..764bb4c 100755
--- a/robotfmt.pl
+++ b/robotfmt.pl
@@ -5,7 +5,7 @@
use Email::Valid;
use URI::Escape;
-use Encode qw(encode decode);
+use MIME::EncWords;
($rev, $branches) = @ARGV;
@@ -113,7 +113,7 @@ while (defined($l = <LOG>)) {
# Strip quotes in From: if author string seems safe
$l = "From: $1 $2";
}
- $l = encode('MIME-Header', $l);
+ $l = MIME::EncWords::encode_mimewords($l, Charset => 'UTF-8');
} else {
if ($l =~ /^([a-z-]+-by|Cc|Author):\s.*<([^\>]+)>\s*$/i) {
$e = $2;