Bug 1070986 followup fix, compare charsets case insensitively. r=jcranmer, a=mkmelin
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sun, 04 Jan 2015 14:38:23 +0200
changeset 17297 48934974110a75a960a8ee9dc61dd8859025fd9c
parent 17296 d5b310aab11531eff440f9f2fa28c61eeb4a7528
child 17298 e8391a2ebe3e7705771b19af6318b0f63e33010c
push id10676
push usermkmelin@iki.fi
push dateSun, 04 Jan 2015 12:39:31 +0000
treeherdercomm-central@e8391a2ebe3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer, mkmelin
bugs1070986
Bug 1070986 followup fix, compare charsets case insensitively. r=jcranmer, a=mkmelin
mail/components/compose/content/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -2407,17 +2407,20 @@ function SetDocumentCharacterSet(aCharse
   else
     dump("Compose has not been created!\n");
 }
 
 function GetCharsetUIString()
 {
   // The charset here is already the canonical charset (not an alias).
   let charset = gMsgCompose.compFields.characterSet;
-  if (charset && charset != gMsgCompose.compFields.defaultCharacterSet) {
+  if (!charset)
+    return "";
+
+  if (charset.toLowerCase() != gMsgCompose.compFields.defaultCharacterSet.toLowerCase()) {
     try {
       return " - " + gCharsetConvertManager.getCharsetTitle(charset);
     }
     catch(e) { // Not a canonical charset after all...
       Components.utils.reportError("Not charset title for charset=" + charset);
       return " - " + charset;
     }
   }