rem: gCharsetMenu = Components.classes['@mozilla.org/rdf/datasource;1?name=charset-menu'].getService().QueryInterface(Components.interfaces.nsICurrentCharsetListener); 
add: gCharsetMenu = Components.classes['@mozilla.org/rdf/datasource;1?name=charset-menu'].getService().QueryInterface(Components.interfaces.nsICurrentCharsetListener); 
context: function charsetLoadListener (event){    var charset = window._content.document.characterSet;    if (charset.length > 0 && (charset != gLastBrowserCharset)) {        if (!gCharsetMenu)           gCharsetMenu = Components.classes['@mozilla.org/rdf/datasource;1?name=charset-menu'].getService().QueryInterface(Components.interfaces.nsICurrentCharsetListener);        gCharsetMenu.SetCurrentCharset(charset);        gPrevCharset = gLastBrowserCharset;        gLastBrowserCharset = charset;    }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/bd30bb8e079e12fac456f57392a03e439ff6b525/browser.js/buggy/browser/base/content/browser.js