Reply to .EML or message/rfc822: problems with MIME-encoded Subject

RESOLVED FIXED in Thunderbird 13.0


MailNews Core
12 years ago
6 years ago


(Reporter: Mike Cowperthwaite, Assigned: hiro)


(Blocks: 1 bug, {intl})

Thunderbird 13.0
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)



(5 attachments, 1 obsolete attachment)



12 years ago
TB 1.6a1-1028, Win2K

With the patches for bug 268746 and bug 204350, it is now possible to use the
Reply, Forward and Edit As New commands in a message window that's displaying a
.EML file or a message/rfc822 attachment.

However, if the Subject or From headers have been MIME-encoded, replying to such a message mangles the Subject and To headers in the new composition.  (However, CC: and To: headers are copied correctly, in the case of a Reply All.)  The exception seems to be if the header is tagged as ISO-8859-1 and/or all its contents fit in ISO-8859-1.

This appears to be true regardless of the encoding used by the message itself
or for the new message composition -- whether or not either or both are the same encoding as the header in question, the resultant header is wrong.

Test message forthcoming.

Comment 1

12 years ago
Created attachment 201291 [details]
Message with MIME-encoded headers

Steps to reproduce:
1) Save this attachment to disk.
2) Open it from Thunderbird (or Seamonkey) using   File|Open
3) In the message window, click Reply All

Actual results:
To: field (originally Big5) and Subject: field (Windows-1255) are gibberish; 
CC: fields are OK.

Expected results:
Characters copied over as displayed in initial message.

This message can be further tweaked by changing its charset, and the charset used for the reply can be tweaked in Options/Preferences.  I haven't found a combination that preserves either the To: or Subject: header text.
Blocks: 269826

Comment 2

10 years ago
On linux the reply subject becomes only "Re: ". (Tried todays tb2.0 build)


9 years ago
Duplicate of this bug: 437307
QA Contact: backend
Product: Core → MailNews Core

Comment 4

9 years ago
Created attachment 341712 [details]
utf-8 QP encoded From; utf-8 body has problem

This is another manifestation of what appears to be this bug in T'Bird This simple .eml file has a From: header which is utf-8 quoted-printable encoded and a message body which is utf-8 encoded. When t2.eml is opened in T'Bird, the From and message body display properly, but upon Reply, the To: and ...wrote: in the composition window are garbled.

Comment 5

9 years ago
Created attachment 341714 [details]
utf-8 QP encoded From; iso-8859-1 body - no problem

This message is identical to the attached t2.eml except that the body is iso-8859-1 encoded instead of utf-8 encoded. This message doesn't exhibit the problem.
reply using TB trunk

To: field looks good
subject jibberish

Comment 7

8 years ago
I see that as well.

Mark Sapiro's problem (a different bug) also WFM in trunk.
Summary: Reply to .EML or message/rfc822: problems with MIME-encoded headers → Reply to .EML or message/rfc822: problems with MIME-encoded Subject
Blocks: 485800
Duplicate of this bug: 485800
No longer blocks: 485800

Comment 9

6 years ago
Created attachment 588589 [details] [diff] [review]
Proposed fix

nsDummyMsgHeader in mail/base/content/msgHdrViewOverlay.js stores 'subject' as decoded text. So decoding the subject in nsMsgCompose::CreateMessage is not needed.

I will post a test for this issue later.
Assignee: nobody → hiikezoe
Attachment #588589 - Flags: review?(dbienvenu)

Comment 10

6 years ago
Created attachment 588809 [details] [diff] [review]
The test

The subject in the test is '∀a∊A'.
Attachment #588809 - Flags: review?(dbienvenu)

Comment 11

6 years ago
Comment on attachment 588809 [details] [diff] [review]
The test

thx very much for the patch, r=me, but a couple nits:

+ * Test that MIME encoded subject is decoded when replying an opened .eml.
+ */
+function test_replay_eml_subject() {

typo: should be reply_eml_subject, not replay

and the comment should be

"when replying to an opened .eml file"
Attachment #588809 - Flags: review?(dbienvenu) → review+

Comment 12

6 years ago
Comment on attachment 588589 [details] [diff] [review]
Proposed fix

thx for the patch and test!
Attachment #588589 - Flags: review?(dbienvenu) → review+

Comment 13

6 years ago
Created attachment 597581 [details] [diff] [review]
Revised test

carrying over review+.
Attachment #588809 - Attachment is obsolete: true
Attachment #597581 - Flags: review+


6 years ago
Keywords: checkin-needed
Last Resolved: 6 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 13.0
You need to log in before you can comment on or make changes to this bug.