Improve method and variable names related to charset detection, fix comments, fix passing detected charset to the UI
Categories
(MailNews Core :: Internationalization, defect)
Tracking
(thunderbird_esr91 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | wontfix |
People
(Reporter: rachel, Assigned: rachel)
Details
Attachments
(3 files, 3 obsolete files)
24.88 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
1.65 KB,
text/plain
|
Details | |
6.82 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1713786 +++
In bug 1713786 manually setting a charset was replaced with charset detection. We feel that the method and variable names should be improved in this area. Also, there are still some comments referring to the "folder charset" that was removed in bug 1671880 part 2.
Previously, it was all about overriding the message charset. Now it is about first auto-detecting a suitable message charset and then overriding the message charset with the auto-detected one. Overriding uses a flag and a charset, auto-detection just uses a flag. We hope that our patch clarifies the concepts.
In a second part we fix a bug that causes the detected charset not being reflected in msgWindow.mailCharacterSet as can be seen with the CharsetMenu add-on.
Assignee | ||
Comment 1•3 years ago
|
||
No functional change here, just renaming methods and variables and fixing comments.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
s/CharSet/Charset/ for consistent spelling.
Assignee | ||
Comment 3•3 years ago
|
||
Test message for Part 2. The message has no charset, but is displayed correctly. However, dumping out msgWindow.mailCharacterSet in the console shows UTF-8, which is not correct.
Assignee | ||
Comment 4•3 years ago
|
||
You can use console.log(msgWindow.mailCharacterSet)
to check the patch. It will now display KOI8-U
which is the detected charset.
Note that the subject isn't displayed correctly, that's bug 1739609.
Assignee | ||
Comment 5•3 years ago
|
||
(In reply to Rachel Martin from comment #4)
Note that the subject isn't displayed correctly, that's bug 1739609.
More precisely: The subject is also in KOI8-U, so of course it's not displayed correctly. Bug 1739609 should likely fix that.
Assignee | ||
Comment 6•3 years ago
|
||
Added a test.
Assignee | ||
Comment 7•3 years ago
|
||
There was potential to improve the existing test.
Comment 8•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/778b87646604
Improve method and variable names related to charset detection. r=mkmelin
https://hg.mozilla.org/comm-central/rev/00ae85f77818
Fix communication of charset back to window. r=mkmelin
Description
•