title: NUL-byte between every other character in output
body: <p>I'm using Ruby to read and then print a file to stdout, redirecting the output to a file in Windows PowerShell.</p>
  
  <p>However, when I inspect the files, I get this for the input:</p>
  
  <pre><code>PS D:&gt; head -n 1 .\inputfile
  &lt;text id="http://observer.guardian.co.uk/osm/story/0,,1009777,00.html"&gt;         &lt;s&gt;             Hooligans       NNS     hooligan
                  ,       ,       ,               unbridled       JJ      unbridled               passion NN      passion
  -       :       -               and     CC      and             no      DT      no              executive       JJ      executiv
  e               boxes   NNS     box             .       SENT    .               &lt;/s&gt;
  </code></pre>
  
  <p>... yet this for the output:</p>
  
  <pre><code>PS D:&gt; head -n 1 .\outputfile
  ÿ_&lt; t e x t   i d = " h t t p : / / o b s e r v e r . g u a r d i a n . c o . u k / o s m / s t o r y / 0 , , 1 0 0 9 7 7 7 , 0
  0 . h t m l " &gt;                  &lt; s &gt;           H o o l i g a n s       N N S   h o o l i g a n                 ,       ,
   ,               u n b r i d l e d       J J     u n b r i d l e d               p a s s i o n   N N     p a s s i o n
   -       :       -               a n d   C C     a n d           n o     D T     n o             e x e c u t i v e       J J
   e x e c u t i v e               b o x e s       N N S   b o x           .       S E N T         .               &lt; / s &gt;
  </code></pre>
  
  <p>How can this happen?</p>
  
  <hr>
  
  <p><strong>Edit</strong>: since my problem didn't have anything to do with Ruby, I've removed the Ruby-code, and included my usage of the Windows shell.</p>