Closed Bug 111055 Opened 23 years ago Closed 23 years ago

Reply: Charset of attachment is overwritten by the charset of mail body

Categories

(MailNews Core :: Internationalization, defect)

All
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.7

People

(Reporter: ji, Assigned: nhottanscp)

Details

(Keywords: intl, regression)

Attachments

(1 file, 2 obsolete files)

***Observed with 11/20 window, linux and Mac trunk builds ***

When replying to a mail with an attachment, although the attachment has charset
info, it's overwritten by the charset of the mail body.

Steps to reproduce:
1. Launch Mail.
2. Select the 3rd mail in smoketest folder which is an iso-2022-jp mail with a
sjis attachment.
3. Click on Reply, you can see the attachment is garbled. After received, the
reply mail has garbled attachement.
Keywords: intl, regression
How about 11/19 builds?
Is the auto detect on or off?
Same problem on 11/19 builds. It also happens as early as 11/09. Auto-detector
status doesn't make difference.
It happens on 11/02 build as well.
It exists on 2001-10-31-21-trunk build, which is the earliest build available on
sweetlou.
I have 10/30 win32 build and it does not have the problem, I also have 10/31 
build which has this problem.
Shanjian, please take a look at this. It might be related to mimetext.cpp 
rev1.35 which was checked in on 10/30).
Assignee: nhotta → shanjian
Added nsbeta1 keyword, this makes reply to Japanese mails with attachments not
usable, since Japanese mail usually has different charset for mail body and
attachment.
Keywords: nsbeta1
The smoketest message with the JA Netscape page does not have a part charset but
libmime parses for a META charset and use it. Not sure why it is only broken for
quoting.
Before my changes for 12481 and there after, html meta charset are allowed to 
override obj->options->override_charset. That does not seem correct to me so I 
change it. But in reply, obj->options->override_charset is set to true and that 
is a problem to me. We should not use this flag to send a different message 
other than it was supposed to.  I tried to disabled override_charset in 
mimetext.cpp and everything works fine. But I believe this right fix should be 
not setting obj->options->override_charset to true. I am looking into this now. 

Status: NEW → ASSIGNED
Attached patch working patch (obsolete) (deleted) β€” β€” Splinter Review
Naoki, 
The problem is in composing, we set original mail's charset as override charset 
to let it help determine the charset of quoted text. This is not the right way 
to use override charset. I guess that quoted message should be able to find its 
charset by going through the same path as in displaying. There might be possible 
regression in certain situation. If the charset passed this way has to be used, 
we might need to add "SetDefaultCharset" and "GetDefaultCharset" to 
"nsMailboxUrl" instead of using override. Would you mind taking care of this 
issue for now? I have to get away from mailnews to focus on other issues. The 
patch I post is just for your reference. 
Assignee: shanjian → nhotta
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.7
nsbeta1+
 plus, regression
Keywords: nsbeta1nsbeta1+
>The problem is in composing, we set original mail's charset as 
>override charset to let it help determine the charset of quoted text.
The reason of setting the override is to quote overridden messages correctly.
Currently, multipart quoting is not really supported when more than one charset
in one message. Only exception was HTML attachments with META (the case of this
bug).
We need to add an extra information to indicate if the original message had an
override flag or not which requires to change many places.

The last patch takes care manual override. Folder level override also has to be
handled.
Attachment #58731 - Attachment is obsolete: true
Attachment #59253 - Attachment is obsolete: true
Comment on attachment 59265 [details] [diff] [review]
Added charsetOverride field to nsIMsgWindow, so msgCompose can use it for quoting.

R=ducarroz
Attachment #59265 - Flags: review+
Comment on attachment 59265 [details] [diff] [review]
Added charsetOverride field to nsIMsgWindow, so msgCompose can use it for quoting.

sr=sspitzer

please add a comment to nsIMsgWindow.idl, explaining what the boolean controls.
Attachment #59265 - Flags: superreview+
checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified with 12/03 trunk build, it is fixed.
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.

Attachment

General

Creator:
Created:
Updated:
Size: