title: C# Issue with reading XML with chars of different encodings in it
body: <p>I faced a problem with reading the XML. The solution was found, but there are still some questions. The incorrect XML file is in encoded in UTF-8 and has appropriate mark in its header. But it also includes a char encoded in UTF-16 - 'é'. This code was used to read XML file for validating its content:</p>
  
  <pre><code>var xDoc = XDocument.Load(taxFile);
  </code></pre>
  
  <p>It raises exception for specified incorrect XML file: "Invalid character in the given encoding. Line 59, position 104." The quick fix is as follows:</p>
  
  <pre><code>XDocument xDoc = null;
  using (var oReader = new StreamReader(taxFile, Encoding.UTF8))
  {
      xDoc = XDocument.Load(oReader);
  }
  </code></pre>
  
  <p>This code doesn't raise exception for the incorrect file. But the 'é' character is loaded as �. My first question is "why does it work?".</p>
  
  <p>Another point is using XmlReader doesn't raise exception until the node with 'é' is loaded. </p>
  
  <pre><code>XmlReader xmlTax = XmlReader.Create(filePath);
  </code></pre>
  
  <p>And again the workout with StreamReader helps. The same question.
  It seems like the fix solution is not good enough, cause one day :) XML encoded in another format may appear and it could be proceed in the wrong way. BUT I've tried to process UTF-16 formatted XML file and it worked fine (configured to UTF-8).</p>
  
  <p>The final question is if there are any options to be provided for XDocument/XmlReader to ignore characters encoding or smth like this.</p>
  
  <p>Looking forward for your replies. Thanks in advance</p>