NOTE: It is not advisable to follow these instructions for the reasons described in this newer post.
If you've done any programming with ASP.NET, you'll notice that by default it outputs this HTTP header:
HTTP/1.1 200 OK
Date: Tue, 26 Sep 2006 05:12:53 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 21
Note that UTF-8 is the default character encoding for ASP.NET. That's no surprise considering that W3C recommends it.
If you request a static HTML file from an IIS server, the default Content-type header does not specify any charset:
Content-Type: text/html
To fix this, run the IIS Manager, right-click your machine name, choose Properties, and navigate your way to this dialog box:
Image may be NSFW.
Clik here to view.
By default, there are 3 extensions with the Content-type of text/html: .html, .htm, .hxt. Tweak all of these to have a Content-type of "text/html; charset=utf-8".
Notes:
- Contrary to what this page says, IIS does seem to allow spaces in the MIME type value.
- Obviously only do this if your static HTML files are really UTF-8.
- The cool thing about this technique is it requires no programming, no editing of HTML files, and it even works on static IIS error pages (i.e. 404, etc.).