From: Oleg Broytman Date: Wed, 19 Feb 2014 16:29:19 +0000 (+0400) Subject: Add "Cc" header to the list of headers to decode by default X-Git-Tag: v2.3.6~3 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=2c5be6f201a2d0bc67356a5b114071139050c135;p=mimedecode.git Add "Cc" header to the list of headers to decode by default --- diff --git a/mimedecode.docbook b/mimedecode.docbook index e0de290..db1bbfa 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", "To" and "Subject". + contains headers "From", "To", "Cc" and "Subject". @@ -337,7 +337,7 @@ the program always uses the default decoding. The program may produce incorrect MIME message. The purpose of the program is to decode whatever it is possible to decode, not to produce absolutely correct MIME output. The incorrect parts are obvious - decoded - From/To/Subject headers and filenames. Other than that output is correct + From/To/Cc/Subject headers and filenames. Other than that output is correct MIME message. The program does not try to guess whether the headers are correct. For example, if a message header states that charset is iso8859-5, but the body is actually in utf-8 the program will recode the message with diff --git a/mimedecode.py b/mimedecode.py index 4776126..6de9d1e 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -273,7 +273,7 @@ class GlobalOptions: host_name = None - decode_headers = ["From", "To", "Subject"] # A list of headers to decode + decode_headers = ["From", "To", "Cc", "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 90b2888..c3e19b7 100644 --- a/test/expected/msg_03.txt +++ b/test/expected/msg_03.txt @@ -6,6 +6,7 @@ Received: by mail.zzz.org (Postfix, from userid 889) Message-ID: <15090.61304.110929.45684@aaa.zzz.org> From: John X. Dôe To: Jãne Y. Doe +Cc: Ćcč 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 b92eb48..0f4626c 100644 --- a/test/input/msg_03.txt +++ b/test/input/msg_03.txt @@ -6,6 +6,7 @@ Received: by mail.zzz.org (Postfix, from userid 889) Message-ID: <15090.61304.110929.45684@aaa.zzz.org> From: John =?iso-8859-1?B?WC4gRPRl?= To: =?iso-8859-1?Q?J=E3ne_Y=2E?= Doe +Cc: =?utf-8?B?xIZjxI0=?= Subject: This is a =?utf-8?B?dGXMgXN0?= message Date: Fri, 4 May 2001 14:05:44 -0400