need to consolidate forced charset setting API

NEW
Assigned to

Status

MailNews Core
Internationalization
13 years ago
9 years ago

People

(Reporter: Eyal Rozenberg, Assigned: smontagu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
You can do any of the following in the 3-pane window or a message display window:

gLastMailCharset = charsetPref;
gCharsetMenu.SetCurrentMailCharset(charsetPref);
MessengerSetForcedCharacterSet('charset.' + charsetPref);
MessengerSetForcedCharacterSet(charsetPref);
SetDefaultCharacterSet('charset.' + charsetPref);
SetForcedCharset('charset.' + charsetPref);
messenger.SetDocumentCharset(charsetPref);
msgWindow.mailCharacterSet = charsetPref; /* with */ msgWindow.charsetOverride = true;

Some of them have partial effects, some of them complain that the browser is unavailable, but only 

MessengerSetForcedCharacterSet(charsetPref);

is what you really want to be doing to simulate clicking some charset on the charset menu. And this is all very confusing. There needs to be at the very least some documentation regarding all of these, and at best some encapsulation to prevent most of these from being executed without triggering an exception or executed at all.
Product: Core → MailNews Core

Comment 1

9 years ago
needed for SM?
Is there a better component for this?
reset QA (was empty)
Severity: minor → normal
QA Contact: i18n
(Reporter)

Comment 2

9 years ago
> needed for SM?
Yes, I think.
You need to log in before you can comment on or make changes to this bug.