title: Newline in text file created in jscript via activeXObject
body: <p>Okay from the top:
  Using the following code I can create a text file using jscript in an htm file from Internet Explorer via an ActiveX object. Yay!
  However, opening the text file in Notepad I noticed new lines appear as mojibake characters (rectangular character) instead of newlines . It's fine in Sublime 2.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;script type="text/javascript"&gt;
  var myStr = "The self same moment I could pray;\nAnd from my neck so free\nThe Albatross fell off, and sank\nLike lead into the sea.";
  var myPath = "C:\\temp\\";
  var myTextfile = "Rime.txt"
  
  writeFile(myPath, myTextfile, myStr)
  function writeFile(apath, afilename, str)
  { 
    var fso = new ActiveXObject("Scripting.FileSystemObject");
    var outFile = fso.CreateTextFile(apath + afilename, true);
    outFile.WriteLine(str);
    outFile.Close();
  }
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I also noticed that it doesn't occur when using the following from Photoshop environment (where I normally script from)</p>
  
  <pre><code>var txtFile = new File(apath + "/" + afilename);
  outFile.open('w');
  outFile.writeln(str);
  outFile.close();
  </code></pre>
  
  <p>Is this just a quirk (or bonus) of ActiveX? Can I change it so it writes new lines that can be viewed properly in Notepad?</p>
  
  <p>And, yes my Mother did warn me about the dangers of getting involved with ActiveX objects.</p>