Closed
Bug 82591
Opened 23 years ago
Closed 23 years ago
HTML mail from News.com has '?' in the body (using IMAP)
Categories
(MailNews Core :: Internationalization, defect, P4)
MailNews Core
Internationalization
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.6
People
(Reporter: dyp, Assigned: nhottanscp)
References
Details
(Keywords: intl)
Attachments
(8 files)
28.72 KB,
text/plain
|
Details | |
155.38 KB,
image/jpeg
|
Details | |
184 bytes,
text/html
|
Details | |
186 bytes,
text/html
|
Details | |
2.00 KB,
patch
|
Details | Diff | Splinter Review | |
2.33 KB,
patch
|
Details | Diff | Splinter Review | |
2.33 KB,
patch
|
bugzilla
:
review+
bugzilla
:
superreview+
|
Details | Diff | Splinter Review |
1.04 KB,
patch
|
bugzilla
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
HTML mail from News.com doesn't seem to understand certain tags that are not visible. I have '?' appearing through the mail. Displays fine in 4.x Messenger.
QA Contact: nbaca → esther
Comment 1•23 years ago
|
||
can you attach the rfc/822 message to this bug? load the message, and do "File | Save As | File".
Reporter | ||
Comment 2•23 years ago
|
||
Reporter | ||
Comment 3•23 years ago
|
||
Comment 4•23 years ago
|
||
The message claims to use charset="us-ascii", but actually uses 8 bits (0xA0, non-breaking space in ISO-8859-1). 0xA0 appears as '?' here, which is correct because it isn't defined in US-ASCII.
Reporter | ||
Comment 5•23 years ago
|
||
But it seems to work fine in all other browsers N4.x as well as IE
Comment 6•23 years ago
|
||
that attached mail file worked fine for me on win2k. I'll try my winnt and win98 builds. cc'ing nhotta who would know what we are supposed to do in this case.
Comment 7•23 years ago
|
||
works for me on my win98 box running 20001052504. dyp, do you see the problem when you save http://bugzilla.mozilla.org/showattachment.cgi?attach_id=36098 as "foo.eml" and then open it up in the brower? if not, I'll turn it into a folder and see if I can see it.
Reporter | ||
Comment 8•23 years ago
|
||
saved it as *.eml file and viewd in Browser. Looks fine in the browser.
Assignee | ||
Comment 9•23 years ago
|
||
I think the question marks are non breaking spaces. Nbsp is not in "us-ascii" range. In the message charset is set to "us-ascii". Content-Type: text/html; charset="us-ascii" I think the question mark will also appear in HTML if that explicitly labeled as "us-ascii" like below. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> David, could you try that?
Comment 10•23 years ago
|
||
Comment 11•23 years ago
|
||
Comment 12•23 years ago
|
||
Not a mail-only problem. Over to i18n. I would probably suggest wontfix on this one....
Assignee: sspitzer → nhotta
Status: UNCONFIRMED → NEW
Component: Mail Window Front End → Internationalization
Ever confirmed: true
OS: Windows 2000 → All
Product: MailNews → Browser
QA Contact: esther → andreasb
Hardware: PC → All
Assignee | ||
Comment 13•23 years ago
|
||
There is optimization in mail code for "US-ASCII". We could verify the data is really 7 bit before applying the optimization. That would prevent invalid UTF-8 data to be sent to the layout and might also fix this problem.
Target Milestone: --- → Future
Assignee | ||
Comment 14•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•23 years ago
|
Target Milestone: Future → mozilla0.9.3
Comment 16•23 years ago
|
||
Looks good but the code + // make sure if the data is really ASCII in order to prevent generating illegal UTF-8 + PRInt32 len = inLength; + PRBool bASCII = PR_TRUE; + for (PRInt32 i = 0; i < inLength; i++) { + if (inBuffer[i] & 0x80) { + bASCII = PR_FALSE; + break; + } } can be written more efficiently! You can use a pointer instead of a array. Also, you could scan 32bits data at once instead of 8bits.
Assignee | ||
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
R=ducarroz if you replace the line + if (*p & (PRUint32)0x80000000) { by + if (*p & (PRUint32)0x80808080) {
Assignee | ||
Comment 19•23 years ago
|
||
Comment 20•23 years ago
|
||
sr=sspitzer assuming that similar code doesn't already live somewhere else in the tree.
Assignee | ||
Comment 21•23 years ago
|
||
Fixed in trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 22•23 years ago
|
||
it looks like there is similar code else where. see nsMsgSearchOnlineMail::Encode() in nsMsgImapSearch.cpp I'll log a bug on nhotta (or ducarroz) to move that code out and into a common place.
Comment 23•23 years ago
|
||
I opened bug #92220 to track the duplicate code.
Assignee | ||
Comment 24•23 years ago
|
||
Reopen, the change was backed out because of a regression bug 92330. nsMsgHeaderParser also calls it with a wrong charset, filed as bug 92420.
Assignee | ||
Updated•23 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: mozilla0.9.3 → ---
Assignee | ||
Comment 25•23 years ago
|
||
The last patch has a problem. If the srs cad dst charsets are equal then it should just dup the string no 7 bit check is needed.
Product: Browser → MailNews
Comment 26•23 years ago
|
||
reassign to jbetak and mark m9.4
Comment 28•23 years ago
|
||
Per Selmer suggestion, I am doing this myself. Moving nsbranch designation from the Status Whiteboard to Keywords.
Keywords: nsbranch
Whiteboard: nsbranch
Comment 29•23 years ago
|
||
so... this is a bug for mailer which does not implement MIME correctly. Delay the fix till nhotta back. mark it as m0.9.6
Target Milestone: mozilla0.9.4 → mozilla0.9.6
Comment 30•23 years ago
|
||
nsbranch- since Frank moved it to 0.9.6
Assignee | ||
Comment 31•23 years ago
|
||
Reassign to nhotta.
Assignee: jbetak → nhotta
Status: ASSIGNED → NEW
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P4
Assignee | ||
Comment 32•23 years ago
|
||
*** Bug 104282 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 33•23 years ago
|
||
By bug 92420, this is not used by headers. And part of bug 12481 caches charset convertors in mime object. After that is fixed, we can remove the optimization code for us-ascii.
Depends on: 12481
Assignee | ||
Comment 34•23 years ago
|
||
Comment 35•23 years ago
|
||
Comment on attachment 43301 [details] [diff] [review] Patch, changed 0x80000000 to 0x80808080. R=ducarroz, SR=sspitzer
Attachment #43301 -
Flags: superreview+
Attachment #43301 -
Flags: review+
Comment 36•23 years ago
|
||
Comment on attachment 54880 [details] [diff] [review] If charset is "us-ascii" then use "ISO-8859-1". I far I know, us-ascii == ISO-8859-1. R=ducarroz
Attachment #54880 -
Flags: review+
Comment 37•23 years ago
|
||
Comment on attachment 54880 [details] [diff] [review] If charset is "us-ascii" then use "ISO-8859-1". sr=sspitzer the strcasecmp is fine, since both are C strings.
Attachment #54880 -
Flags: superreview+
Assignee | ||
Comment 38•23 years ago
|
||
Checked in to the trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•