Forum Moderators: open
<META http-equiv="Content-Type" content="text/html; charset=UTF-16"> I would like the outputted code to be XHTML-compliant, and also to use UTF-8. But I cannot see a way to stop ASP adding the above line.
If I add the META tag manually, then I end up with two!
What is the solution?
Note: in none of the files is a META tag or output set.
I then discovered that the META tag was only added when there was a HEAD tag in the XSL template. If I just had HTML then BODY, it would not add a META tag. This mirrors what the specs say here [w3.org]:
The encoding attribute specifies the preferred encoding to be used. If there is a HEAD element, then the html output method should add a META element immediately after the start-tag of the HEAD element specifying the character encoding actually used.*
I cannot find any way to control the contents of the META tag added, no matter what output or method I declare in the XSL template. So either I'm missing something or it's a bug in ASP or the server is set to give UTF-16.
*Hmm, does that mean what the server is sending? I get "- not supplied - (windows-1252)".
I can't wait for XSL 2.0 which adds an XHTML output type!