title: Write Tab Delimited File
body: <p>I'm having trouble writing a Tab-delimited File and I've checked around here and have not gotten my answers yet.</p>
  
  <p>So I've got a function that returns the string with the important pieces below (delimiter used and how I build each line):</p>
  
  <pre><code>var delimiter = @"\t";
  sb.Append(string.Join(delimiter, itemContent));
  sb.Append(Environment.NewLine);
  </code></pre>
  
  <p>The string returned is like this:</p>
  
  <pre><code>H\t13\t170000000000001\t20150630
  D\t1050\t10.0000\tY
  D\t1050\t5.0000\tN
  </code></pre>
  
  <p>And then I write it to a file with this (content below is the string above):</p>
  
  <pre><code>var content = BuildFile(item);
  var filePath = tempDirectory + fileName;
  
  // Create the File
  using (FileStream fs = File.Create(filePath))
  {
      Byte[] info = new UTF8Encoding(true).GetBytes(content);
      fs.Write(info, 0, info.Length);
  }
  </code></pre>
  
  <p>However, the file output is this with no tabs (opened in notepad++):</p>
  
  <pre><code>H\t13\t170000000000005\t20150630
  D\t1050\t20.0000\tN
  D\t1050\t2.5000\tY
  </code></pre>
  
  <p>When it should be more like this (sample file provided):</p>
  
  <pre><code>H   100115980   300010000000003 20150625
  D   430181  1   N
  D   342130  2   N
  D   459961  1   N
  </code></pre>
  
  <p>Could this be caused by the encoding I used? Appreciate any input you may have, thanks!</p>