Closed Bug 144917 Opened 22 years ago Closed 22 years ago

SJIS attachment is mislabeled as ISO-2022-JP when send page from this URL

Categories

(MailNews Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0.1

People

(Reporter: ji, Assigned: nhottanscp)

References

()

Details

(Keywords: intl, regression, Whiteboard: [adt2 rtm][ETA 05/31])

Attachments

(1 file)

Build: latest branch build

When sending page from above URL which has charset meta tag specified as x-sjis,
the attachment is mislabeled as ISO-2022-JP, the page is not displayed correctly
in message view page unless it's manually corrected to SJIS from menu.

Steps to reproduce:
1. Go to above URL
2. Select File | Send Page and send it out as a Japanese (ISO-2022-JP) mail
3. After received, observe the attachment display in message view pane.
4. View message source on this mail, the attachment is mislabeled as ISO-2022-JP.

Notes:
1. I don't see this if I save the page to the local drive and send it out as an
attachment, in that case, the attachment is labeled correctly as Shift-JIS.  
2. It also doesn't happen if I send page from http://home.netscape.com/ja
3. The page has meta like:
<meta HTTP-EQUIV='CONTNT-TYPE' CONTENT='text/html; charset=x-sjis' />
Keywords: intl
On that web page, there is JavaScript before charset meta tag, could that cause
the problem?
Does NS6.2 have the problem?
Status: NEW → ASSIGNED
With 6.2.3, it's encoded in base64.
Keywords: regression
Discussed this with Naoki, there are two problems here.
1. Parsing problem. This page has charset meta tag, but it's not picked up.
2. Content charset tag problem. In case the attachment doesn't have charset,
like plain text file, or the charset meta tage is not picked up, like this
testing page, "send page" always use the charset specified for mail body.

Nominating for nsbeta1 since it's a regression, the Japanese user may easily
encounter this problem and our client sends out "bad" mails which causes the
display problem to the other mail clients too.
Keywords: nsbeta1
Blocks: 141008
Keywords: nsbeta1nsbeta1+
http://lxr.mozilla.org/seamonkey/source/mailnews/compose/src/nsMsgSend.cpp#2276

There is a code which sets main body's charset to non local attachment files. 
That is wrong. We cannot assign mail body's charset for attachment files.
The lines existed before NS6.2, so not sure why NS6.2 not have the problem.
Cc to ducarroz. Jean-Francois, any major changes around attachment handling
since NS6.2?
Target Milestone: --- → mozilla1.0
Comment on attachment 84129 [details] [diff] [review]
Change not to set the mail charset to attachments. Changed the meta parse function for performance.

R=ducarroz
Attachment #84129 - Flags: review+
Comment on attachment 84129 [details] [diff] [review]
Change not to set the mail charset to attachments. Changed the meta parse function for performance.

sr=bienvenu
Attachment #84129 - Flags: superreview+
checked in to the trunk


In comment #4,
>1. Parsing problem. This page has charset meta tag, but it's not picked up.
This problem still exists. But this is not critical as the incorrect label
problem. And Mozilla recognizes the META charset in attachments for display even
not specified as Content-Type charset. This can be filed as a separate bug.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Verified as fixed with 05/21 trunk build.
Filed bug 145996 for the charset parsing problem.
Status: RESOLVED → VERIFIED
Keywords: adt1.0.0, approval
Whiteboard: [adt2 rtm]
Blocks: 143047
Whiteboard: [adt2 rtm] → [adt2 rtm] [Needs a=] [ETA 05/31]
Target Milestone: mozilla1.0 → mozilla1.0.1
adt1.0.0+ (on ADT's behalf) for approval to checkin to the 1.0 branch,pending
Driver's approval.  After, checking in, please add the fixed1.0 keyword.
Keywords: adt1.0.0adt1.0.0+
changing to adt1.0.1+ for checkin to the 1.0 branch for the Mozilla1.0.1
milestone.  Please get drivers approval before checking in.
Keywords: adt1.0.0+adt1.0.1+
Keywords: mozilla1.0.1
Comment on attachment 84129 [details] [diff] [review]
Change not to set the mail charset to attachments. Changed the meta parse function for performance.

please check into the 1.0.1 branch ASAP. once landed remove the 
mozilla1.0.1+ keyword and add the fixed1.0.1 keyword
Attachment #84129 - Flags: approval+
Whiteboard: [adt2 rtm] [Needs a=] [ETA 05/31] → [adt2 rtm][ETA 05/31]
checked in to 1.0.1
Keywords: fixed1.0.1
Blocks: 146292
No longer blocks: 141008
Keywords: mozilla1.0.1+
verified as fixed with the latest branch build.
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: