From 49e07178e7847c463e37dc9d9241fb06d7cd210a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 18 Feb 2014 22:44:05 +0400 Subject: [PATCH] Decode "To" header by default --- mimedecode.docbook | 2 +- mimedecode.py | 2 +- test/expected/msg_03.txt | 2 +- test/input/msg_03.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mimedecode.docbook b/mimedecode.docbook index b4c0187..ac1d7ea 100644 --- a/mimedecode.docbook +++ b/mimedecode.docbook @@ -192,7 +192,7 @@ command-line options. Add the header to a list of headers to decode; initially the list - contains headers "From" and "Subject". + contains headers "From", "To" and "Subject". diff --git a/mimedecode.py b/mimedecode.py index 7604fb2..b57bd95 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -275,7 +275,7 @@ class GlobalOptions: host_name = None - decode_headers = ["From", "Subject"] # A list of headers to decode + decode_headers = ["From", "To", "Subject"] # A list of headers to decode decode_header_params = [ ("Content-Type", "name"), ("Content-Disposition", "filename"), diff --git a/test/expected/msg_03.txt b/test/expected/msg_03.txt index 5643b4f..90b2888 100644 --- a/test/expected/msg_03.txt +++ b/test/expected/msg_03.txt @@ -5,7 +5,7 @@ Received: by mail.zzz.org (Postfix, from userid 889) id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT) Message-ID: <15090.61304.110929.45684@aaa.zzz.org> From: John X. Dôe -To: bbb@zzz.org +To: Jãne Y. Doe Subject: This is a tést message Date: Fri, 4 May 2001 14:05:44 -0400 diff --git a/test/input/msg_03.txt b/test/input/msg_03.txt index 5a1cc9c..b92eb48 100644 --- a/test/input/msg_03.txt +++ b/test/input/msg_03.txt @@ -5,7 +5,7 @@ Received: by mail.zzz.org (Postfix, from userid 889) id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT) Message-ID: <15090.61304.110929.45684@aaa.zzz.org> From: John =?iso-8859-1?B?WC4gRPRl?= -To: bbb@zzz.org +To: =?iso-8859-1?Q?J=E3ne_Y=2E?= Doe Subject: This is a =?utf-8?B?dGXMgXN0?= message Date: Fri, 4 May 2001 14:05:44 -0400 -- 2.39.5