title: Why does .net use the UTF16 encoding for string, but uses UTF-8 as default for saving files?
body: <p><a href="http://csharpindepth.com/Articles/General/strings.aspx" rel="noreferrer">From here</a></p>
  <blockquote>
  <p>Essentially, string uses the UTF-16 character encoding form</p>
  </blockquote>
  <p>But when saving vs <a href="http://msdn.microsoft.com/en-us/library/wtbhzte9.aspx" rel="noreferrer">StreamWriter</a> :</p>
  <blockquote>
  <p>This constructor creates a StreamWriter with UTF-8 encoding without a
  Byte-Order Mark (BOM),</p>
  </blockquote>
  <p>I've seen this sample (broken link removed):</p>
  <p><img src="https://i.stack.imgur.com/QYDgv.jpg" alt="enter image description here" /></p>
  <p>And it looks like <code>utf8</code> is smaller for some strings while <code>utf-16</code> is smaller in some other strings.</p>
  <ul>
  <li>So why does .net use <code>utf16</code> as default encoding for string and <code>utf8</code> for saving files?</li>
  </ul>
  <p>Thank you.</p>
  <p><em>p.s. Ive already read <a href="http://www.joelonsoftware.com/articles/Unicode.html" rel="noreferrer">the famous article</a></em></p>