title: Transforming string to UTF8
body: <p>I have a string that I receive from email via C# and I want to display it in a correct format. I know the encoding in coming in as <code>Encoding.Default</code>, According to <a href="https://stackoverflow.com/questions/14057434/how-can-i-transform-string-to-utf-8-in-c?answertab=votes#tab-top">this answer</a> I have to convert it to utf8, So I tried this code:</p>
  
  <pre><code>byte[] bytes = Encoding.Default.GetBytes(input);
  string strResult = Encoding.UTF8.GetString(bytes);
  </code></pre>
  
  <p>It works, but it can't convert some characters:<br>
  Actually in web mail interface Original string is:</p>
  
  <pre><code>باسلام همکار گرامی شماره 53018 مربوط به دبیرخانه ستاد می باشد لطفا اصلاح فرمائید 
  </code></pre>
  
  <p>When I convert the string with the code I give this result:</p>
  
  <pre><code>باس �?ا�? �?�?�?ار گرا�?�? �?ا�?�? ش�?ار�? 53018  �?رب�?ط ب�? د ب�?رخا�?�? ستاد �?�? باشد �?طفا اص�?اح فر�?ائ�?د�? 
  </code></pre>
  
  <p>Any idea?<br>
  Update:
  PS: The content of the input variable:</p>
  
  <pre><code>Ø§ÙØ²Ø§ÙØ´ ØªØ³ÙÙÙØ§Øª \r\n \r\n\r\n Ø¨Ø§Ø³ ÙØ§Ù ÙÙÙØ§Ø± Ú¯Ø±Ø§ÙÙ ÙØ§ÙÙ Ø´ÙØ§Ø±Ù
  </code></pre>