Closed Bug 806011 Opened 7 years ago Closed 4 years ago
Can't change the character set for opened saved message
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
Duplicate of this bug: 1244110
nsMessenger::SetDocumentCharset - http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMessenger.cpp#1596
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.
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+
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.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
Aurora (TB 46): https://hg.mozilla.org/releases/comm-aurora/rev/d61d865c805e
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+
You need to log in before you can comment on or make changes to this bug.