Closed Bug 150530 Opened 22 years ago Closed 22 years ago

Character Coding is wrong when replying to multipart message

Categories

(MailNews Core :: MIME, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: kazhik, Assigned: nhottanscp)

References

Details

(Keywords: intl, Whiteboard: [ish1+][verifiedish1])

Attachments

(3 files)

Character Coding is wrong when replying to multipart message.

(1) Compose a message in ASCII with setting [View]-[Character Coding]
to ISO-8859-1, and save it as draft.

(2) Open the draft message with Forward button(set forward message 
setting to "As Attachment"), write Japanese text with setting 
[View]-[Character Coding] to ISO-2022-JP, and save it as draft.

(3) Open the draft message with Reply button.


Actual result: [View]-[Character Coding] is ISO-8859-1

Expected result: ISO-2022-JP


Original report in Bugzilla-jp:
http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=2293
Blocks: 157673
Please specify mozilla build info.
Keywords: intl
Reassign to nhotta.
Assignee: ducarroz → nhotta
QA Contact: gayatri → trix
I think our current implementation for multipart takes a charset of the last
part which is correct for alternative type. For mixed type, we may want to do
differently.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2alpha
Keywords: nsbeta1
Target Milestone: mozilla1.2alpha → ---
Whiteboard: [ish1+]
Attached file A testing mail.
To reproduce the problem, save the mail to local folders, and then reply to the
mail.
QA contact to myself.
QA Contact: trix → ji
While debuging this, I found the charset is re-initialized by the mail font code.
I think that was not intended by bug 112904 (this also related to bug 107869).
cc to shanjian
Target Milestone: --- → mozilla1.3alpha
The font code should not change the menu check mark, so the menu code is
separated from the charset initialization function.
Comment on attachment 104592 [details] [diff] [review]
Separated the menu charset code from the charset initialization function.

R=ducarroz
Attachment #104592 - Flags: review+
Comment on attachment 104592 [details] [diff] [review]
Separated the menu charset code from the charset initialization function.

sr=bienvenu
Attachment #104592 - Flags: superreview+
Whiteboard: [ish1+] → [ish1+][fixedish1]
Whiteboard: [ish1+][fixedish1] → [ish1+][verifiedish1]
Comment on attachment 104911 [details] [diff] [review]
Make sure to set the menu charset for non multipart case.

R=ducarroz
Attachment #104911 - Flags: review+
Reopened, due to a regression
Whiteboard: [ish1+][verifiedish1] → [ish1+]
Comment on attachment 104911 [details] [diff] [review]
Make sure to set the menu charset for non multipart case.

sr=bienvenu - I would use the ? operator here:
SetMailCharacterSetToMsgWindow(body, nsCRT::strcasecmp(text->charset,
"us-ascii") ?  NS_ConvertASCIItoUCS2(text->charset).get() ... since it might
generate more efficient code, but it would be a long line, so it's up to you.
Attachment #104911 - Flags: superreview+
I filed a bug 178680 to move the charset name comparison to inside
SetMailCharacterSetToMsgWindow().
Whiteboard: [ish1+] → [ish1+][fixedish1]
Whiteboard: [ish1+][fixedish1] → [ish1+][verifiedish1]
checked in to the trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Depends on: 180372
No longer blocks: 157673
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: