title: Why is File.ReadAllBytes result different than when using File.ReadAllText?
body: <p>I have a text file (UTF-8 encoding) with contents "test". I try to get the byte array from this file and convert to string, but it contains one strange character. I use the following code:</p>
  
  <pre><code>var path = @"C:\Users\Tester\Desktop\test\test.txt"; // UTF-8
  
  var bytes = File.ReadAllBytes(path);
  var contents1 = Encoding.UTF8.GetString(bytes);
  
  var contents2 = File.ReadAllText(path);
  
  Console.WriteLine(contents1); // result is "?test"
  Console.WriteLine(contents2); // result is "test"
  </code></pre>
  
  <p><code>conents1</code> is different than <code>contents2</code> - why?</p>