Our pages are currently being rendered using the Unicode specification.
I found one way to remove this by adding the following to my OnInit homepage.
protected override void OnInit(EventArgs e) { base.OnInit(e); Response.ContentEncoding = new System.Text.UTF8Encoding(false); }
Where false is passed to the constructor UTF8Encoding disables the specification.
This works fine, but I would rather set it in web.config rather than relying on the fact that it is in the OnInit hierarchy on any given page.
globalization element has a responseEncoding attribute that takes a string representation of valid encoding. eg.
<globalization responseEncoding="utf-8" ... />
Is there a way to represent "utf-8 without specification" as a string that can be used as the value for responseEncoding in the web.config file?
source share