diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/content/io.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/content/io.js b/common/content/io.js index d6bf284a..2c30240b 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -604,15 +604,14 @@ function IO() //{{{ let ifstream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(Ci.nsIFileInputStream); let icstream = Cc["@mozilla.org/intl/converter-input-stream;1"].createInstance(Ci.nsIConverterInputStream); - let charset = "UTF-8"; + let toCharset = "UTF-8"; if (typeof file == "string") file = ioManager.getFile(file); else if (!(file instanceof Ci.nsILocalFile)) throw Cr.NS_ERROR_INVALID_ARG; // FIXME: does not work as expected, just shows undefined: undefined ifstream.init(file, -1, 0, 0); - const replacementChar = Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER; - icstream.init(ifstream, charset, 4096, replacementChar); // 4096 bytes buffering + icstream.init(ifstream, toCharset, 4096, Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER); // 4096 bytes buffering let buffer = ""; let str = {}; |