Bug 715204 - Non-ascii titles are displayed as garbage during session restore. r=bnicholson

This commit is contained in:
Makoto Kato 2012-01-19 20:36:14 +09:00
parent 8abeaa91a6
commit 31f19bf8b7
2 changed files with 2 additions and 2 deletions

View File

@ -939,7 +939,7 @@ SessionStore.prototype = {
// Read session state file into a string and let observers modify the state before it's being used // Read session state file into a string and let observers modify the state before it's being used
let state = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); let state = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
state.data = NetUtil.readInputStreamToString(aStream, aStream.available()) || ""; state.data = NetUtil.readInputStreamToString(aStream, aStream.available(), { charset : "UTF-8" }) || "";
aStream.close(); aStream.close();
Services.obs.notifyObservers(state, "sessionstore-state-read", ""); Services.obs.notifyObservers(state, "sessionstore-state-read", "");

View File

@ -731,7 +731,7 @@ SessionStore.prototype = {
// Read session state file into a string and let observers modify the state before it's being used // Read session state file into a string and let observers modify the state before it's being used
let state = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString); let state = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
state.data = NetUtil.readInputStreamToString(aStream, aStream.available()) || ""; state.data = NetUtil.readInputStreamToString(aStream, aStream.available(), { charset : "UTF-8" }) || "";
aStream.close(); aStream.close();
Services.obs.notifyObservers(state, "sessionstore-state-read", ""); Services.obs.notifyObservers(state, "sessionstore-state-read", "");