mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 692767 - about:home shows tabs from last time with wrong encoding, non-ASCII characters are broken [r=mbrubeck]
This commit is contained in:
parent
a1ace9621b
commit
1b96b92163
@ -193,10 +193,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
let content = NetUtil.readInputStreamToString(aStream, aStream.available()) || "";
|
||||
let fileSize = aStream.available();
|
||||
let cvstream = Cc["@mozilla.org/intl/converter-input-stream;1"].createInstance(Ci.nsIConverterInputStream);
|
||||
cvstream.init(aStream, "UTF-8", fileSize, Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
|
||||
let content = {};
|
||||
cvstream.readString(fileSize, content);
|
||||
cvstream.close();
|
||||
aStream.close();
|
||||
|
||||
aCallback(content.replace(/\r\n?/g, "\n"));
|
||||
aCallback(content.value.replace(/\r\n?/g, "\n"));
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user