title: XSL:Output with encoding=utf-8 not working with XslCompiledTransform
body: <p>I have the output element in xslt file as:</p>
  
  <pre><code>&lt;xsl:output method="xml" indent ="yes" omit-xml-declaration="no" standalone="no" encoding="utf-8" version="1.0" /&gt;
  </code></pre>
  
  <p>I am using <code>System.Xml.Xsl.XslCompiledTransform</code> class to transform an xml document into another one. The transformed xml that is generated has <code>encoding="utf-16"</code> despite  instructing that to be utf-8.</p>
  
  <pre><code>XslCompiledTransform xslt = new XslCompiledTransform();
  xslt.Load("prices.xsl");
  XsltArgumentList xslArg = new XsltArgumentList();
  BookPrice obj = new BookPrice();
  xslArg.AddExtensionObject("urn:price-conv", obj);
  StringWriter wr = new StringWriter();
  xslt.Transform(XmlReader.Create(new StringReader(GetFileData("books.xml"))), xslArg, wr);
  writeToFile("output.xml", wr.ToString());
  </code></pre>