Why doesn't the following code set the XML declaration encoding type? It always sets the encoding to utf-16 instead. Am I missing something very obvious?
var xdoc = new XDocument(
new XDeclaration("1.0", "iso-8859-1", null),
new XElement("root", "")
);
output:
<?xml version="1.0" encoding="utf-16"?>
<root></root>