I have an ActionResult that returns XML for an embedded device. The relevant code is:
return Content(someString, "text/xml", Encoding.UTF8);
Even though UTF-8 is specified, the resulting XML is:
<?xml version="1.0" encoding="utf-16"?>
The ASP.NET MVC is compiled as AnyCPU and runs on a Windows 2008 server.
Why is it not returning UTF-8 encoded XML?