From 1ffb5e90adcdfa19f2babf619b02aa06ddd83026 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 17 Dec 2008 16:30:26 -0500 Subject: Minor cleanup --- common/content/io.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common/content') 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 = {}; -- cgit v1.2.3