How to set the http-equiv="Content-Type" when writing XHTML documents.

windows

Guest
Hi Everybody,<br />
<br />
I have written an xhtml document that looks like this:<br />
<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><br />
<head><br />
<meta http-equiv="Content-Type" content="text/xml; charset=UTF-8" /><br />
.....<br />
.....<br />
<br />
When I try to validate this at the W3C I get the following error message:<br />
<br />
The HTTP Content-Type header sent by your web browser (unknown) did not contain a "charset" parameter, but the Content-Type was one of the XML text/* sub-types (text/xml). The relevant specification (RFC 3023) specifies a strong default of "us-ascii" for such documents so we will use this value regardless of any encoding you may have indicated elsewhere. If you would like to use a different encoding, you should arrange to have your browser send this new encoding information. <br />
<br />
I am wondering how to go about giving the document correct meta information. I need this xhtml document to work in IE6+ and NS7+. If anybody knows how to make the xml declaration and meta data behave could you please let me know?<br />
<br />
Thanks for your help.<br />
<br />
Regards<br />
<br />
David<!--content-->Give this a try:<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />I'd also strongly recommend you read Mark Pilgrim's excellent: The Road to XHTML 2.0: MIME Types (<!-- m --><a class="postlink" href="http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html">http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html</a><!-- m -->).<!--content-->
 
Back
Top