title: VBS Scripting.FileSystemObject Need help writing ANSI txt File
body: <p>I am trying to create an ANSI file. But everything I try gives me an UTF-8 w/o BOM.</p>
  
  <p>I have tried to do this with the least amount of code for testing purpose and this is what I found.</p>
  
  <pre><code> Dim myFile 
   Dim objFSO : Set objFSO=CreateObject("Scripting.FileSystemObject")
   Set myFile = objFSO.CreateTextFile("C:\TestFile.txt")
   myFile.Close
  </code></pre>
  
  <p>The above code gives me an ANSI file as advertised by MSDS but when i write to it in the bellow code</p>
  
  <pre><code> Dim myFile 
   Dim objFSO : Set objFSO=CreateObject("Scripting.FileSystemObject")
   Set myFile = objFSO.CreateTextFile("C:\TestFile.txt")
   myFile.WriteLine "TestLine"
   myFile.Close
  </code></pre>
  
  <p>When inspecting the file using Notepad++ now I have UTC-8 w/o BOM</p>
  
  <p>There is code awaiting for the actual file I am trying to create. the code was not accepting the file. after some tedious debugging I found that it does not like the UTF format. If I save as ANSI using Notepad++ now the code accepts the file. I need to do this programmatically from the go.</p>
  
  <p>Can anyone confirm if they get the same results? 
  How do I make sure I end up with an ANSI text file?
  Thank you</p>