Prepare for m-c removal of the intl.charset.detector.ng.enabled pref
Categories
(MailNews Core :: MIME, task, P1)
Tracking
(thunderbird78 unaffected)
Tracking | Status | |
---|---|---|
thunderbird78 | --- | unaffected |
People
(Reporter: hsivonen, Assigned: mkmelin)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
pmorris
:
review+
|
Details | Diff | Splinter Review |
Bug 1603712 will remove the intl.charset.detector.ng.enabled
pref by making it unconditionally true. c-c will likely need minor corresponding clean-up.
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
A couple of notes:
- Using
FallbackCharset
to match the Windows system "ANSI" code page was wrong and only worked if the Thunderbird and Windows localizations matched. It would probably be better to ask Windows for the "ANSI" code page and then either use Window's system conversion facility or use the mapping from https://github.com/hsivonen/charset - The detector part in
MsgDetectCharsetFromFile
always returns some encoding name, so it's not necessary to have a fallback in the callers.
Assignee | ||
Comment 2•4 years ago
|
||
It looks like we should just drop the system charset concept and do detection on the file instead. There are really few callers.
Comment 3•4 years ago
|
||
Off-topic: https://github.com/hsivonen/charset provides UTF-7 support, however, TB has its own here:
https://searchfox.org/comm-central/search?q=&path=utf7&case=false®exp=false
So what's the story with this library?
Assignee | ||
Comment 4•4 years ago
|
||
With this it builds, and the modified test succeeds.
I think there's more cleanup to be done, and as of now the encoding menu isn't being populated correctly.
I'm running out of time for now. Paul, can you have a look, and also see if you can get the menus going again?
Reporter | ||
Comment 5•4 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #1)
use the mapping from https://github.com/hsivonen/charset
Oops. Sorry. I meant to link to https://github.com/hsivonen/codepage
(In reply to Jorg K (CEST = GMT+2) from comment #3)
Off-topic: https://github.com/hsivonen/charset provides UTF-7 support, however, TB has its own here:
https://searchfox.org/comm-central/search?q=&path=utf7&case=false®exp=false
So what's the story with this library?
The library is a hobby project I wrote in Rust. It's not in Firefox, so in that sense it's not directly available to Thunderbird. Also, it doesn't do the IMAP stuff.
Comment 6•4 years ago
|
||
Will do, I'm working on this now.
Assignee | ||
Comment 7•4 years ago
|
||
Comment 8•4 years ago
|
||
The changes look good and worked for me when I built and tested it. This revision removes a couple more things. This lazy getter that was removed in the m-c patch:
diff --git a/mail/components/customizableui/CustomizableWidgets.jsm b/mail/components/customizableui/CustomizableWidgets.jsm
--- a/mail/components/customizableui/CustomizableWidgets.jsm
+++ b/mail/components/customizableui/CustomizableWidgets.jsm
-XPCOMUtils.defineLazyGetter(this, "CharsetBundle", function() {
- const kCharsetBundle = "chrome://global/locale/charsetMenu.properties";
- return Services.strings.createBundle(kCharsetBundle);
-});
And this panelview (used in m-c) that the previous revision had included, but isn't needed:
diff --git a/mail/components/customizableui/content/panelUI.inc.xhtml b/mail/components/customizableui/content/panelUI.inc.xhtml
--- a/mail/components/customizableui/content/panelUI.inc.xhtml
+++ b/mail/components/customizableui/content/panelUI.inc.xhtml
- <panelview id="PanelUI-characterEncodingView" flex="1">
- <vbox class="panel-subview-body">
- <vbox id="PanelUI-characterEncodingView-pinned"
- class="PanelUI-characterEncodingView-list"/>
- <toolbarseparator/>
- <vbox id="PanelUI-characterEncodingView-charsets"
- class="PanelUI-characterEncodingView-list"/>
- </vbox>
- </panelview>
Following some discussion with mkmelin, I'm going to go ahead and land this to get us un-busted.
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
Pulsebot on strike?
This landed yesterday: https://hg.mozilla.org/comm-central/rev/d31e5b627413057dd99c2ccd901a3a8b6261272d
Comment hidden (Intermittent Failures Robot) |
Description
•