rem:  if (pref) { pref.setCharPref("intl.charset.detector", prefvalue); editorShell.LoadUrl(editorShell.editorDocument.location); 
add: catch (ex) { dump("Failed to set the intl.charset.detector preference.\n"); 
context: function ComposerSelectDetector(event){    //dump("Charset Detector menu item pressed: " + event.target.getAttribute('id') + "\n");    var uri =  event.target.getAttribute("id");    var prefvalue = uri.substring('chardet.'.length, uri.length);    if("off" == prefvalue) { // "off" is special value to turn off the detectors        prefvalue = "";    }    var pref = Components.classes['@mozilla.org/preferences-service;1'];    if (pref) {        pref = pref.getService();        pref = pref.QueryInterface(Components.interfaces.nsIPrefBranch);    }    if (pref) {        pref.setCharPref("intl.charset.detector", prefvalue);          editorShell.LoadUrl(editorShell.editorDocument.location);        }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/6fd0039b81704ddbf72d71cebe2a44d07769547b/charsetOverlay.js/buggy/xpfe/global/resources/content/charsetOverlay.js