rem: appCore.setDefaultCharacterSet(arrayArgComponents[1]); 
add:  getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1]; 
context: function viewSource(url){  if (!url)    return false; // throw Components.results.NS_ERROR_FAILURE;  try {    appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"]                        .createInstance(Components.interfaces.nsIBrowserInstance);    // Initialize browser instance..    appCore.setWebShellWindow(window);  } catch(ex) {    // Give up.    window.close();    return false;  }  try {    if ("arguments" in window && window.arguments.length >= 2) {      if (window.arguments[1].indexOf('charset=') != -1) {        var arrayArgComponents = window.arguments[1].split('=');        if (arrayArgComponents) {          appCore.setDefaultCharacterSet(arrayArgComponents[1]); //XXXjag see bug 67442        }       }    }  } catch(ex) {  }  var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE;  var viewSrcUrl = "view-source:" + url;  getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null);  //check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly  if (gPrefs) {    try {      var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines");      if (wraplonglinesPrefValue)        document.getElementById('menu_wrapLongLines').setAttribute("checked", "true");    } catch (ex) {    }  }  window._content.focus();  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/7db937fa8536e713f53f773a961da728c97cdf1d/viewsource.js/clean/suite/browser/viewsource.js