title: WebBrowser DocumentText encoding
body: <p>I have come across something strange and I'd like your opinion.</p>
  
  <p>There is a webpage which contains a <code>span</code> element with some greek text in the <code>InnerText</code> and <code>InnerHtml</code> attributes.</p>
  
  <p>The encoding of the page is <strong>Greek(Windows)</strong>.</p>
  
  <p>My <code>if</code> statement is:</p>
  
  <pre class="lang-cs prettyprint-override"><code>if (mySpan != null &amp;&amp; mySpan.InnerText.Contains(greekText))
  </code></pre>
  
  <p>This line works 100%, but my previous non-working code was:</p>
  
  <pre class="lang-cs prettyprint-override"><code>if (mySpan != null &amp;&amp; browser.DocumentText.Contains(greekText))
  </code></pre>
  
  <p>This line did not work, and when I clicked on the preview withing the debugger I noticed that the greek text was unreadable (strange symbols instead of greek characters). However, all of other elements that contained greek text were successfully read by the application, that is I could save their attributes in variables and use them. Is there any explanation why <code>DocumentText</code> failed and <code>InnerText</code> succeeded?</p>