title: Read txt files (in unicode and utf8) by means of C#
body: <p>I created two txt files (windows notepad) with the same content "thank you - спасибо" and saved them in utf8 and unicode. In notepad they look fine. Then I tried to read them using .Net:</p>
  
  <pre><code>...File.ReadAllText(utf8FileFullName, Encoding.UTF8);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>...File.ReadAllText(unicodeFileFullName, Encoding.Unicode);
  </code></pre>
  
  <p>But in both cases I got this "thank you - ???????". What's wrong?</p>
  
  <p>Upd: 
  code for utf8</p>
  
  <pre><code>static void Main(string[] args)
          {
              var encoding = Encoding.UTF8;
              var file = new FileInfo(@"D:\encodes\enc.txt");
              Console.OutputEncoding = encoding;
              var content = File.ReadAllText(file.FullName, encoding);
              Console.WriteLine("encoding: " + encoding);
              Console.WriteLine("content: " + content);
              Console.ReadLine();
          }
  </code></pre>
  
  <p>Result:
  <strong>thanks ÑÐ¿Ð°ÑÐ¸Ð±Ð¾</strong></p>