Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment
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
add comment

Your Answer

 
discard

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.