I have an ActionResult that returns XML for an embedded device. Relevant Code:
return Content(someString, "text/xml", Encoding.UTF8);
Although UTF-8 is specified, the resulting XML:
<?xml version="1.0" encoding="utf-16"?>
ASP.NET MVC compiles as AnyCPU and runs on a Windows 2008 server.
Why doesn't it return XML-encoded UTF-8?
source
share