Closed Bug 806011 Opened 7 years ago Closed 4 years ago

Can't change the character set for opened saved message

Categories

(Thunderbird :: Message Reader UI, defect)

16 Branch
x86_64
Windows 7
defect
Not set

Tracking

(thunderbird44 wontfix, thunderbird45 fixed, thunderbird46 fixed, thunderbird47 fixed)

RESOLVED FIXED
Thunderbird 47.0
Tracking Status
thunderbird44 --- wontfix
thunderbird45 --- fixed
thunderbird46 --- fixed
thunderbird47 --- fixed

People

(Reporter: dma_k, Assigned: jorgk)

References

Details

Attachments

(3 files)

Attached file test.eml
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0
Build ID: 20120824154833

Steps to reproduce:

* Open the attached test.eml using "File → Open Saved Message"...
* Having the "View → Character Encoding → Auto-Detect" set to "Russian", the given message is not correctly recognized as UTF-8 message.
* Setting "Character Encoding" to "Unicode (UTF-8)" has no effect.

Expected: It is not possible to force the correct encoding to view the massage.
Same behavior in 16.0.2 if Autodetect encoding is turned off.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Looking at it in the debugger shows that at
https://dxr.mozilla.org/comm-central/source/mailnews/base/src/nsMessenger.cpp#1600
mLastDisplayURI is empty, to the block that follows is skipped and the message is not displayed again using the override charset. Note, that forwarding/replying does use the override.

mLastDisplayURI is only set once here in nsMessenger::OpenURL():
https://dxr.mozilla.org/comm-central/source/mailnews/base/src/nsMessenger.cpp#445

Also note the comment here:
https://dxr.mozilla.org/comm-central/source/mailnews/base/src/nsMessenger.h#90

Messages opened from files are treated in nsMessenger::LoadURL().

Setting mLastDisplayURI there fixes the problem. Patch coming.
One-line fix as discussed in comment #5.
Attachment #8713865 - Flags: review?(mkmelin+mozilla)
Comment on attachment 8713865 [details] [diff] [review]
Suggested solution (v1).

Review of attachment 8713865 [details] [diff] [review]:
-----------------------------------------------------------------

Yes, this seems reasonable and works fine! r=mkmelin
Attachment #8713865 - Flags: review?(mkmelin+mozilla) → review+
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Comment on attachment 8713865 [details] [diff] [review]
Suggested solution (v1).

[Approval Request Comment]
Regression caused by (bug #): No regression.
User impact if declined: Low, can't change charset of message opened from file.
Testing completed (on c-c, etc.): Manual.
Risk to taking this patch (and alternatives if risky):
Not risky, one line change to set the message URL.
Attachment #8713865 - Flags: approval-comm-beta?
Attachment #8713865 - Flags: approval-comm-aurora+
https://hg.mozilla.org/comm-central/rev/f98bae5d9f43
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
Comment on attachment 8713865 [details] [diff] [review]
Suggested solution (v1).

http://hg.mozilla.org/releases/comm-beta/rev/18da5ccc17b1
Attachment #8713865 - Flags: approval-comm-beta? → approval-comm-beta+
See Also: → 1331042
You need to log in before you can comment on or make changes to this bug.