Skip to content

Commit

Permalink
Show script source messes up character encoding
Browse files Browse the repository at this point in the history
Ad greasemonkey#1940
The suggestion (for example).
  • Loading branch information
janekptacijarabaci committed Jul 29, 2014
1 parent 0098901 commit 9072c43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/remoteScript.js
Expand Up @@ -95,6 +95,7 @@ function DownloadListener(
this._fileOutputStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
this._fileOutputStream.init(aFile, -1, -1, null);
this._fileOutputStream.write('\u00EF\u00BB\u00BF', 3); // UTF-8 BOM
this._binOutputStream = Cc['@mozilla.org/binaryoutputstream;1']
.createInstance(Ci.nsIBinaryOutputStream);
this._binOutputStream.setOutputStream(this._fileOutputStream);
Expand Down

0 comments on commit 9072c43

Please sign in to comment.