Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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)

share|improve this answer

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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