Closed Bug 41009 Opened 25 years ago Closed 23 years ago

"Edit Message As New" is quoting non-ASCII mails with no or wrong MIME charset info as garbage

Categories

(MailNews Core :: Internationalization, defect, P2)

All
Windows NT

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.2alpha

People

(Reporter: ji, Assigned: bugzilla)

References

()

Details

(Keywords: intl)

Attachments

(6 files)

Build: 2000053008 comm build

"Message | Edit Message As New" is quoting Ja mails as garbage.

Steps of reproduce:
1. Unzip the smoketest folder at the above URL and put the folder under
   your testing account.
2. Go to the 2nd mail and select Message | Edit Message As New.
   You'll see the Japanese characters in the mail body is quoted as garbage.
Attached image Attached a screen shot. β€”
UTF8 mail looks fine (the 4th mail in the smoketest folder).
This problem is observed with the 2nd mail, which is in iso-2022-jp encoding.
We also don't see a checkmark against an encoding menu
when it fails like this. 
Reassign to selmer.
I think the charset conversion (from mail charset to UTF-8) is missing.
Assignee: nhotta → selmer
reassigning to rhp, cc'ing jefft (I can never remember who worked on this).
Please reassign if I got it wrong.
Assignee: selmer → rhp
Putting it on the heap.

- rhp
Status: NEW → ASSIGNED
Target Milestone: --- → M18
*** Bug 43084 has been marked as a duplicate of this bug. ***
Keywords: correctness, nsbeta3
Ok, I see what the problem is here and I have a fix for it now in my tree.

- rhp
Summary: "Edit Message As New" is quoting Ja mails as garbage → [FIXED] "Edit Message As New" is quoting Ja mails as garbage
Whiteboard: [FIXED]
per selmer and mail/news PDT.
Whiteboard: [FIXED] → [FIXED] [nsbeta3+]
It is curiosu that people who don't use Japanese mail are marking
a critical bug like this as "correctness". 
If you have a fix, I want it in the product. This is a feature a lot of users
including myself use often/daily to send out mail with slightly different 
text or wording. 
This feature does not work for anything other than ASCII or Latin 1 mail
right now. 

That is not "correctness". That is called "broken" for all
languages which don't use Latin 1 encoding.

Renominating for nsbeta2.
If you have a fix, please put it in the product.
Whiteboard: [FIXED] [nsbeta3+]
Who are you yelling at here? I have a fix and I'll check it into whatever tree 
you want, but I'm starting on the tip.

- rhp
Rich, I apologize. 
I didn't realize that this bug has not been nominated for nsbeta2
before this. I had thought it had already been done so.
I would like to see this done for beta2. So I'm nominating it now.
Ok, this is fixed now on the tip, but I will just hold this here in case we 
want this checked in on the branch.

- rhp
Putting on [dogfood-] radar.  Not critical to everyday use. Putting on 
[nsbeta2-] radar. Not critical to beta2. Editing drafts should be working, and 
this is a subtle feature.  There is a workaround by saving as a draft and 
opening the draft for editing.
Whiteboard: [dogfood-] [nsbeta2-]
Updating status.

- rhp
Whiteboard: [dogfood-] [nsbeta2-]
Per selmer and mail/news PDT.

- rhp
Whiteboard: [nsbeta3+]
Checked this fix into the tip.

- rhp
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Summary: [FIXED] "Edit Message As New" is quoting Ja mails as garbage → "Edit Message As New" is quoting Ja mails as garbage
There is no workaround to this.
Saving as draft and trying to edit it has exactly the same problem.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
As the suggested workaround simply does not work for this problem,
I'm requesting reconsideration.
Keywords: correctness, nsbeta3nsbeta2
Whiteboard: [nsbeta3+]
Status: REOPENED → ASSIGNED
Can we please end the churn on this one bug.

- rhp
Whiteboard: [FIXED]
Not a major feature. [nsbeta2-] for branch.  If fixed in Trunk, marked FIXED to 
verify.
Whiteboard: [FIXED] → [nsbeta2-][nsbeta3+]
Yes, this is fixed in the trunk. Checked in the changes 7/26.

- rhp
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Adding keyword to bugs with nsbeta3 triage value in status whiteboard so 
tracking queries will not be misled
Keywords: nsbeta3
** Observed with 8/10/2000 Win32 M18 build **

We finally shipped Beta 2 and I now have a bit of room to see what
happened to this bug.
I guess I need to re-open this bug.

The fix seems to be working for the following case:

1. When the message contains charset info in the headers.

It does not work for the following type of cases:

2. The message is displaying correctly because the view default charset works OK
   for that message but it has no MIME charset info in the headers.
3. The message contains incorrect MIME charset info in the headers but
   was corrected by a manual charset override and now it shows correctly and
   the menu checkmark also is correct.

In 2 and 3, "Message as New" fails for both the header and body, neither
of which has MIME charset info.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Uh, at this point I don't think we are going to be able to handle the 
situations where messages are not labled properly or labeled improperly. 

Opinions from others?

- rhp
Status: REOPENED → ASSIGNED
Some facts to consider:

1. Both types of messages do exist.
2. A user will have a hard time understanding why a message 
   we can diaplay properly cannot be edited as new properly. 
I understand that they do exist...but the issue is that we are at beta3 now and 
lots of stuff that does exist/occur is being Latered. How did 4.x handle this 
issue? Are we worse than that?

- rhp
Talking from an outward appearance point of view,
4.x can handle 2 above with no problem, and 3 above
with partial success probably. In 3, body can
be corrected but subject header may not be easily
correctable. 
So, yes, we are worse off than 4.7x from a phenomenal
point of view.
Can you point me to specific messages that exhibit #2 and #3 behavior.

Thanks.

- rhp
These messages have no MIME charset info either in headers or for body parts.
But they can be viewed with ISO-2022-JP as the default viewing charset set in
the Pref dalog.
The 2nd file contains messages whose body (not subject header) contains incorrect
charset info. Corect the body view looking at the headers -- some are Japanese
messages. Then try Edit as New.
Keywords: mail2
P2 per mail triage
Priority: P3 → P2
second pass: - per mail triage unfortunately. Workaround is to copy/paste 
contents of mail msg.
Whiteboard: [nsbeta2-][nsbeta3+] → [nsbeta2-][nsbeta3-][cut 8/31]
for my sorting...
Target Milestone: M18 → M20
Target Milestone: M20 → M18
Just some personal sorting.

- rhp
Target Milestone: M18 → M20
Target Milestone: M20 → Future
sorry for the extra email. Removing mail2 keyword.
Keywords: mail2
Keywords: intl
Keywords: nsbeta1
marking nsbeta1- as per I18N triage.
Keywords: nsbeta1nsbeta1-
Mass change of QA contact to ji for the bugs filed by her.
QA Contact: momoi → ji
Since this problem only happens with the mails with no or wrong MIME charset 
info, changed the summary accordingly.
Summary: "Edit Message As New" is quoting Ja mails as garbage → "Edit Message As New" is quoting Ja mails with no or wrong MIME charset info as garbage
reassigning to ducarroz
Assignee: rhp → ducarroz
Status: ASSIGNED → NEW
this has been cut a few times during the seamonkey dev cycle. Request we fix it
this time, since it is marked as P1 | Major. please change target milestone to
M0.9.1
renominating for rtm.
Keywords: nsbeta1-, nsbeta2, nsbeta3rtm
Summary: "Edit Message As New" is quoting Ja mails with no or wrong MIME charset info as garbage → "Edit Message As New" is quoting non-ASCII mails with no or wrong MIME charset info as garbage
Modified the summary since the problem is not only for JA mails, it's a problem 
for all the non-ASCII mails with wrong or no MIME charset info.
*** Bug 85764 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla0.9.7
Keywords: nsrtm
Whiteboard: [nsbeta2-][nsbeta3-][cut 8/31]
Target Milestone: mozilla0.9.7 → mozilla0.9.9
Keywords: nsbeta1+
Attached patch (quick!) fix, v0.5 β€” β€” Splinter Review
Here's a patch, that show source of problem: we're checking only message
headers
for charset.
Patch fixes this, but my feeling is that we just should always use
mdd->mailcharset (it's the same as comp fields' charset), but I need
confirmation from Jean-Francois.

Also, it seems to me that it's possible to simplify
charset->unicode->utf8->unicode body conversion in some cases, need to 
think more carefully...
Attached patch (alpha) patch, v0.6 β€” β€” Splinter Review
I think that mdd->mailcharset should have precedence over mime headers info
(cause it reflects charset override, isn't?).
Also I tried to remove extra string conversions from unicode to utf8 and back.
Keywords: patch, review
I got an impression, that mdd->mailcharset is always the same as
bodyCharset - both is set by
MimeHeaders_get_parameter (mdd->messageBody->type, "charset", NULL, NULL);
Strange...
Uff! msg window charset override is set, then 
mdd->mailcharset is set to override charset,
although I don't know where :-)
Moving out, but if the patch is good, we should get it in.
Blocks: 122274
Keywords: nsbeta1+nsbeta1-
Target Milestone: mozilla0.9.9 → mozilla1.2
No longer blocks: 122274
This is fixed now (probably by bug 66098), please verify.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago23 years ago
Resolution: --- → FIXED
Verified as 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: