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?


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)


you could try tags in the header of your html file. You could also try to check your HTML files for the UTF8-BOM. If a hex editor shows three characters before the first regular character, that would be the reason why IIS might send out Content-Type-headers with that encoding.

  • As I said, I already specify ISO-8859-1 encoding in my HTML (with meta tags) - the W3C Validator tells me that there is a conflict between this and the server headers. And the files are all saved with ISO-8859-1 encoding. – Mark Bell Nov 4 '09 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.