title: Why is xmlWriter writing ASCII characters in the output xml file?
body: <p>Here's how I set up my xmlWriter and xmlWriterSettings:</p>
  
  <pre><code>        XmlWriterSettings settings = new XmlWriterSettings();
          settings.Encoding.Equals("UTF-8"); 
          settings.Indent = true;
          settings.OmitXmlDeclaration = true;
          settings.NewLineOnAttributes = true;           
          settings.CheckCharacters = true;
          settings.OmitXmlDeclaration = false;
  
          XmlWriter xmlWriter =  XmlWriter.Create(otptFile,settings);
  </code></pre>
  
  <p>I produce a file that looks like a valid xml file, but when I run it through a validator I get an error: ascii "\EF" does not map to unicode.</p>
  
  <p>If I open this file in textpad and just save it, this error goes away and the file is valid.</p>
  
  <p>I am using streamReader to read in an ascii file. I checked if I needed to set something in the streamreader declaration, but from what I understand UTF-8 is the default.</p>
  
  <p>I am trying to understand why my program has ascii values if I have set the encoding to UTF-8 and how I can get rid of the easily in my code. Thanks for your help!</p>