rem: var pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); var str =  Components.classes["@mozilla.org/supports-wstring;1"] .createInstance(Components.interfaces.nsISupportsWString); 
add: var str =  Components.classes["@mozilla.org/supports-string;1"] .createInstance(Components.interfaces.nsISupportsString); 
context: function SelectDetector(event, doReload){    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 = "";    }    try {        var pref = Components.classes["@mozilla.org/preferences-service;1"]                             .getService(Components.interfaces.nsIPrefBranch);        var str =  Components.classes["@mozilla.org/supports-wstring;1"]                             .createInstance(Components.interfaces.nsISupportsWString);        str.data = prefvalue;        pref.setComplexValue("intl.charset.detector",                             Components.interfaces.nsISupportsWString, str);        if (doReload) window._content.location.reload();    }    catch (ex) {        dump("Failed to set the intl.charset.detector preference.\n");    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c008ce69158d0e94a0c4cf19c0992fdc3fa19a08/browser.js/buggy/browser/base/content/browser.js