Closed
Bug 115869
Opened 23 years ago
Closed 23 years ago
Reply: Sender's name is not quoted correctly when the mail doesn't MIME header
Categories
(MailNews Core :: Internationalization, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: ji, Assigned: nhottanscp)
Details
Attachments
(3 files, 1 obsolete file)
(deleted),
text/plain
|
Details | |
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
bugzilla
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
When a mail doesn't have MIME charset info, the display can be corrected by
either selecting a proper charset from the charset menu or by setting a proper
folder charset. In former case, replying to the mail after the display is
corrected by selecting a charset menu, the sender's name is not quoted
correctly. The program doesn't pick up the charset that the user has specified
from menu.
Steps to reproduce:
1. Have a non-ASCII mail w/o MIME header in your mailbox. Make sure the mail has
a non-ASCII sender. (I'll attach a testing mail later)
2. Correct the display by selecting a proper charset.
3. Click on Reply. You can see the sender's name is not quoted correctly.
4. Set a proper folder charset to correct the display of the mail, then click on
Reply, you won't see this problem.
Assignee | ||
Comment 2•23 years ago
|
||
So the subject does not have the problem?
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Comment 4•23 years ago
|
||
This may be related to bug 118740.
Does this work if you override to ISO-2022-JP before the reply?
I don't see this problem anymore on 01/18 build. Marked it as wfm.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Comment 6•23 years ago
|
||
This bug is still reproducible on today's build, please reopen.
It can't just disappear as result of other bugs fixing.
The reason of this bug is as follows:
"<author> wrote:" string is generated in QuotingOutputStreamListener constructor:
rv = originalMsgHdr->GetMime2DecodedAuthor(getter_Copies(author));
nsMsgHdr::GetMime2DecodedAuthor() calls
nsMsgDatabase::RowCellColumnToMime2DecodedString(), but this function checks only
folder's override charset to pass to mimeConverter::DecodeMimeHeader().
So, if From: header is not mime encoded we end up with author decoded using
iso8859-1 charset (fallback).
Could you attach a testing mail to this report?
I still don't see the problem with 01/23 build.Thanks.
Comment 8•23 years ago
|
||
Uhm... testcase for this bug is not working for me. When I reply to test message,
I get "$BEl[j7r;J(B wrote:" instead of hieroglyphs... (make sure that defauls
charset of your folder not set to iso-2022-jp)
Comment 9•23 years ago
|
||
Comment 10•23 years ago
|
||
Xianglan, i can show you this case on my machine with russian newsgroups
Reporter | ||
Comment 11•23 years ago
|
||
Yes, you are right. Reply doesn't pick up the charset selected from the charset
menu. Reopened the bug.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee | ||
Comment 12•23 years ago
|
||
I tried
Created an attachment (id=62112)
with my debug build and did not see the problem.
Xianglan, could you try this with the latest trunk?
Reporter | ||
Comment 13•23 years ago
|
||
I still see this on 01/31 build.
Comment 14•23 years ago
|
||
Don't forget - to reproduce this bug, test mail charset and your folder charset
must be different
Assignee | ||
Comment 15•23 years ago
|
||
I was looking at the wrong field, it is reproducible.
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 16•23 years ago
|
||
That field is decoded in the database code which only knows about the folder
charset (and folder override). We could do differently in case the message is
manually overridden.
Assignee | ||
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
Comment on attachment 68935 [details] [diff] [review]
Changed QuotingOutputStreamListener to pass charset and charsetoverride to the constructor, also added MimeConverter to the class because it is used in multiple places.
Looks good. R=ducarroz
Attachment #68935 -
Flags: review+
Comment 19•23 years ago
|
||
Don't you want to add override charset param to GetMime2DecodedXXX calls?
I recall another bug saying that thread pane not updated when one changed
override charset. The reason of this bug is exactly the same - GetMime2DecodedXXX
calls into msg database functions which uses only folder level charset override.
By adding charset parameter to these functions we can fix both bugs :-)
(Or may be wtire wrapper function instead? I think code you added is gonna be used
in several places :-) )
Assignee | ||
Comment 20•23 years ago
|
||
I did not modified it because the db code does not have to take care per message
override which is manually set by UI.
Assignee | ||
Comment 21•23 years ago
|
||
>I recall another bug saying that thread pane not updated when one changed
>override charset.
Folder level override flag is an attribute which is accessible in the db code.
Thread pane not supposed to be updated by the per message override.
Comment 22•23 years ago
|
||
>Folder level override flag is an attribute which is accessible in the db code.
>Thread pane not supposed to be updated by the per message override.
So the only way to get readable display of no-mime message in thread pane is
to set folder charset?
Assignee | ||
Comment 23•23 years ago
|
||
yes
Comment 24•23 years ago
|
||
Comment on attachment 68935 [details] [diff] [review]
Changed QuotingOutputStreamListener to pass charset and charsetoverride to the constructor, also added MimeConverter to the class because it is used in multiple places.
sr=bienvenu
Attachment #68935 -
Flags: superreview+
Assignee | ||
Comment 25•23 years ago
|
||
I checked in but backed out because the decoder I used returns null if the input
is ASCII. I either need to change the decoder to dup the string or change the
compose code to check null.
Assignee | ||
Comment 26•23 years ago
|
||
Attachment #68935 -
Attachment is obsolete: true
Comment 27•23 years ago
|
||
I can't see the difference between the two patches - are you sure you attached
the right diffs for the last patch?
Assignee | ||
Comment 28•23 years ago
|
||
Added this comment.
+ // Decode header, the result string is null if the input is non MIME
encoded ASCII.
And changed this line.
- rv = parser->ExtractHeaderAddressName("UTF-8",
NS_ConvertUCS2toUTF8(author).get(),
+ rv = parser->ExtractHeaderAddressName("UTF-8", decodedString ?
decodedString.get() : author.get(),
Comment 29•23 years ago
|
||
Comment on attachment 69193 [details] [diff] [review]
A new patch, added a check to the decoded header, if null then use the original header string.
got it, thx, sorry 'bout that. sr=bienvenu
Attachment #69193 -
Flags: superreview+
Comment 30•23 years ago
|
||
Comment on attachment 69193 [details] [diff] [review]
A new patch, added a check to the decoded header, if null then use the original header string.
R=ducarroz
Attachment #69193 -
Flags: review+
Assignee | ||
Comment 31•23 years ago
|
||
checked in
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
•