rem: var send_default_charset = prefs.CopyCharPref("mailnews.send_default_charset"); var menuitem = document.getElementById(send_default_charset); if (menuitem) menuitem.setAttribute('checked', 'true'); else dump("getElementById failed for " + send_default_charset + "\n"); 
add: var compFieldsCharset = msgCompose.compFields.GetCharacterSet(); if (compFieldsCharset.toUpperCase() == "US-ASCII") compFieldsCharset = "ISO-8859-1"; menuitem = document.getElementById(compFieldsCharset);   if (send_default_charset.toUpperCase() != compFieldsCharset.toUpperCase()) { if (menuitem && menuitem.getAttribute('checked') == false) { menuitem.setAttribute('checked', 'true'); return; } } menuitem = document.getElementById(send_default_charset); if (menuitem) menuitem.setAttribute('checked', 'true'); 
context: function InitCharsetMenuCheckMark(){  // return if the charset is already set explitily  if (currentMailSendCharset != null) {    dump("already set to " + currentMailSendCharset + "\n");    return;  }  // try to get preferences service  var prefs = null;  try {    prefs = Components.classes['component://netscape/preferences'];    prefs = prefs.getService();    prefs = prefs.QueryInterface(Components.interfaces.nsIPref);  }  catch (ex) {    dump("failed to get prefs service!\n");    prefs = null;  }  var send_default_charset = prefs.CopyCharPref("mailnews.send_default_charset");  var menuitem = document.getElementById(send_default_charset);  if (menuitem)    menuitem.setAttribute('checked', 'true');  else    dump("getElementById failed for " + send_default_charset + "\n");  // Set a document charset to a default mail send charset.  SetDocumentCharacterSet(send_default_charset);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/93991fcc9b2accece4a3a614b06c3c22ffcc1a66/MsgComposeCommands.js/clean/mailnews/compose/resources/content/MsgComposeCommands.js