Closed Bug 54051 Opened 24 years ago Closed 24 years ago

For multipart/mixed mails, the charset of last attachment overrides the charset of the mail.

Categories

(MailNews Core :: Internationalization, defect, P2)

All
Windows 95
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ji, Assigned: nhottanscp)

Details

(Keywords: regression, Whiteboard: nsbeta3-[rtm++])

***Observed with linux and win32 2000092509 build ***** The charset of the original mail is not reflected in the reply or forward window. Steps to reproduce: 1. Launch browser. 2. Send page of http://home.netscape.com/ja to your mail account, or compose a Japanese mail with local Japanese ShiftJis file and send it to your account. 3. Go to the mail sent at Step 2, click on Reply or select Message | Forward as | Inline On the Reply or Forward compose window, select View | Character Coding, you'll see no charset has check mark on the left. After receiving the reply or forwarded mail, open the View | Message source window of the reply or forwarded mail, you'l l see the charset the reply/forward used is ShiftJis which is the charset of the attachment.
I talked to Naoki, This is a problem limited to multipart/mixed mails. For this kind of mails, the charset of last attachment will override the charset of the mail. Changed the summary accordingly.
Summary: The charset of the mail is not reflected in Reply/Forward window when the mail has attachments → For multipart/mixed mails, the charset of last attachment overrides the charset of the mail.
Is this a regression?
Yes, this is a regression. Looks like this is a side effect of bug 46881 fix. 46881 - Can't recognize charset info in multipart/alternative mail --> corrupt reply mail If I back out the fix for this (mimemult.cpp rev 1.16), this bug is gone. Adding mscott and rhp to cc.
Here is a diff to fix the problem. Basically, restore one condition which was removed by the change for multipart/alternative. With the patch, we pick up correct charset for both multipart/alternative and multipart/mixed. Index: mimemult.cpp =================================================================== RCS file: /cvsroot/mozilla/mailnews/mime/src/mimemult.cpp,v retrieving revision 1.18 diff -c -r1.18 mimemult.cpp *** mimemult.cpp 2000/09/13 09:06:37 1.18 --- mimemult.cpp 2000/09/25 22:21:53 *************** *** 210,215 **** --- 210,221 ---- PRBool isBody = MimeObjectChildIsMessageBody(obj, &isAlternativeOrRelated); if ( (isAlternativeOrRelated || isBody) && obj->options) { + MimeContainer *container = (MimeContainer*) obj; + // If we have only one child and this is the message body object, + // this we should check for a special charset and notify the emitter + // if one exists! + if ( (isAlternativeOrRelated) || ((container->children) && (container->nchildren == 1)) ) + { char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE); if (ct) { *************** *** 230,235 **** --- 236,242 ---- PR_FREEIF(ct); PR_FREEIF(cset); } + } } } break;
Status: NEW → ASSIGNED
Put nsbeta3 and P3 -> P2, a message may not be seen correctly by sending with an incorrect charset label. Especially bad for Japan where main body charset and HTML attachment charset are usually different.
Keywords: nsbeta3
Priority: P3 → P2
nsbeta3+ per ftang
Whiteboard: nsbeta3+
FTang - If we are going to want to check this in this week, I believe we need to go before PDT to get an nsbetta3++.
adding regression keyword
Keywords: regression
I got an approval from mscott for the patch.
Not holding PR3 for this, so marking nsbeta3-. If this is serious enough to fix for RTM, please nominate.
Whiteboard: nsbeta3+ → nsbeta3-
Nominating for RTM+. Adding RTM keyword.
Keywords: rtm
So for this bug, I got r=sr=mscott.
got review. got superreview. The patch is in this bug. please consider rtm++
Whiteboard: nsbeta3- → nsbeta3-[rtm+]
Bumping up to rtm double plus. Please land on branch asap.
Whiteboard: nsbeta3-[rtm+] → nsbeta3-[rtm++]
Checked in the patch to both brach and trunk.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified with 2000100909 win32, linux, mac branch build. It is fixed.
Status: RESOLVED → VERIFIED
Keywords: vtrunk
Reopening to Resolve as Fixed. Bugs stay resolved until verified on both the branch and the trunk.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Resolving as Fixed. vtrunk keyword is in place requesting trunk verification before this bug changes state to Verified. When this is verified on the trunk vtrunk keyword should be removed and the bug Status should be set to Verified. Sorry for the spam, just trying to make sure we cover all of our bases here.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
** Checked with 11/4/2000 MN Windows build ** The problem is fixed on the branch build above. Reply or Forward/inline does not corrupt the body text when the attachment has different charset than the main body charset. The menu checkmark is correct also. Forward as attachment also correctly reflects the charset of the main body. ji, please check the Linux case. I will check Mac.
Sorry, this is to be verified on the trunk. The branch verification is already done by ji.
Verified with linux, win32 and mac 2000-12-19-06-Mtrunk build.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.