Forum Moderators: not2easy
My page validates tentatively without the declaration, but would like it to validate properly. What is going on?
I know in .NET you can add the encoding declaration to the web.config, but is there a way with ASP or IIS to add this or even a CSS hack to fix the layout problem?
I would also argue that the XML declaration is only needed if you are serving your pages as application-xml/xhtml, which as you may know, does not work in IE anyway (it tries to download the page!).
text/html mime type - which means almost all XHTML documents. The best was to declare the charset if you are using ASP is to add an HTTP header declaring the charset before the page is sent. I don't do ASP so I don't know the exact syntax, but I think it's something like this:
<%response.Charset="utf-8"%> (See the MSDN documentation [msdn.microsoft.com])
If you're really stuck, you could also just use the old meta charset tag in the page head (but it's a compromise solution):
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />