rem: if (window._content.defaultCharacterset) httpDS.encoding = window._content.defaultCharacterset; 
add: if (window.content.defaultCharacterset) httpDS.encoding = window.content.defaultCharacterset; 
context: function Init(){  debug("directory.js: Init()\n");  var tree = document.getElementById('tree');  // Initialize the tree's base URL to whatever the HTTPIndex is rooted at  var baseURI = HTTPIndex.BaseURL;  if (baseURI && (baseURI.indexOf("ftp://") == 0)) {    // fix bug # 37102: if its a FTP directory    // ensure it ends with a trailing slash    if (baseURI.substr(baseURI.length - 1) != "/") {      debug("append traiing slash to FTP directory URL\n");      baseURI += "/";    }	  // Lets also enable the loggin window.	  var node = document.getElementById("main-splitter");	  node.setAttribute("hidden", false);	  node = document.getElementById("logbox");	  node.setAttribute("hidden", false);  }  if (baseURI && (baseURI.indexOf("file://") != 0)) {    // Note: DON'T add the HTTPIndex datasource into the tree    // for file URLs, only do it for FTP/Gopher/etc URLs; the "rdf:files"    // datasources handles file URLs    tree.database.AddDataSource(HTTPIndex);  }  // Note: set encoding BEFORE setting "ref" (important!)  var RDF = Components.classes[RDFSERVICE_CONTRACTID].getService();  if (RDF) RDF = RDF.QueryInterface(nsIRDFService);  if (RDF) {    loadingArc = RDF.GetResource(NC_LOADING, true);    var httpDS = HTTPIndex.DataSource;    if (httpDS) httpDS = httpDS.QueryInterface(nsIHTTPIndex);    if (httpDS) {      httpDS.encoding = "ISO-8859-1";      // Use a default character set.      if (window._content.defaultCharacterset)        httpDS.encoding = window._content.defaultCharacterset;    }  }  // set window title  document.title = baseURI;  tree.database.AddObserver(RDF_observer);  debug("Directory: added observer\n");  // root the tree (do this last)  tree.setAttribute("ref", baseURI);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1d353cf17066d2f547c8c0c0a4ef429259ec9263/directory.js/buggy/suite/common/directory/directory.js