title: Powershell script outputting Chinese characters when it's not meant to
body: <p>I've written a script which does a benchmark on the time taken to run <strong>any</strong> command that I input, such as <code>ping google.com -n 1</code> and I'm having trouble with the output.</p>
  
  <p>When I run the code in an interactive shell, it is fine, but when I run it as a powershell <code>.ps1</code> script, it puts out chinese characters like this: </p>
  
  <blockquote>
    <p>〱䘠扥ㄠ㨰㈵瀉湩⁧潧杯敬挮浯ⴠ⁮ऱ㌲⸹ㄷ㔳獭਍</p>
  </blockquote>
  
  <p>That is the "result" from <code>ping google.com -n 1</code></p>
  
  <p>Needless to say, I'm a little confused as to why it is doing this...</p>
  
  <p>Any ideas?</p>
  
  <hr>
  
  <p>This is my code:</p>
  
  <pre><code>$command = Read-Host "Enter command"
  
  "DateTime`tCommand`tTime Taken" | Out-file "$($command -replace '[^A-Za-z]','').csv"
  
  While (1) {
  
      $time = date -f "dd MMM HH:mm"
  
      $cmdtime = [string](
      Measure-Command {iex $command}
      ).TotalMilliseconds + "ms"
  
     "$($time)`t$($command)`t$($cmdtime)" | Out-File "$($command -replace '[^A-Za-z]','').csv" -a
  
     Sleep 60;
  }
  </code></pre>