Iis – How to change the default character encoding in IIS on Windows Server 2003

charsetencodingiiswindows-server-2003

When validating my web page using the W3C Validator, I noticed that although I specify ISO-8859-1 encoding in my HTML, the web server seems to be specifying UTF-8 encoding in the HTTP headers.

I've looked everywhere but I can't seem to find a way to change this – am I missing something?

Best Answer

I have figured this out now, and perhaps the reason for the lack of answers was that my question omitted a crucial detail, which was that this is an ASP.NET web site.

The content encoding is set in the Machine.config file when the .NET Framework is installed, and it defaults to UTF-8. You can edit this file which will affect the response encoding of all ASP.NET sites, or you can override it on a per-site basis using the <globalisation> element in each site's Web.config file.

Globalization Element Reference (MSDN)