Can't change the character set for opened saved message

RESOLVED FIXED in Thunderbird 47.0

Status

Thunderbird
Message Reader UI
RESOLVED FIXED
5 years ago
3 months ago

People

(Reporter: Dmitry, Assigned: Jorg K (GMT+2))

Tracking

16 Branch
Thunderbird 47.0
x86_64
Windows 7

Thunderbird Tracking Flags

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

Details

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
Created attachment 675746 [details]
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.
(Reporter)

Comment 1

5 years ago
Created attachment 675747 [details]
Screenshot of the viewer

Comment 2

5 years ago
Same behavior in 16.0.2 if Autodetect encoding is turned off.
(Assignee)

Updated

a year ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

a year ago
Duplicate of this bug: 1244110

Comment 4

a year ago
nsMessenger::SetDocumentCharset - http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMessenger.cpp#1596
(Assignee)

Comment 5

a year ago
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.
(Assignee)

Comment 6

a year ago
Created attachment 8713865 [details] [diff] [review]
Suggested solution (v1).

One-line fix as discussed in comment #5.
Attachment #8713865 - Flags: review?(mkmelin+mozilla)

Comment 7

a year ago
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+

Updated

a year ago
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
(Assignee)

Updated

a year ago
Keywords: checkin-needed
(Assignee)

Comment 8

a year ago
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+

Comment 9

a year ago
https://hg.mozilla.org/comm-central/rev/f98bae5d9f43
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
(Assignee)

Comment 10

a year ago
Aurora (TB 46):
https://hg.mozilla.org/releases/comm-aurora/rev/d61d865c805e
status-thunderbird44: --- → wontfix
status-thunderbird45: --- → affected
status-thunderbird46: --- → fixed
status-thunderbird47: --- → fixed
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+

Updated

a year ago
status-thunderbird45: affected → fixed

Updated

3 months ago
See Also: → bug 1331042
You need to log in before you can comment on or make changes to this bug.