Lachlan Hunt wrote:  [snip]

Did you read my article [1] which Rimantas referred you to? That explains what you're supposed to do. You need to use real HTTP headers, not the inferior meta element. The end of that article links to another that actually explains how to set the charset parameter in the HTTP headers using various servers and server-side scripting languages [2].

Well Lachlan, not only did I read it, I printed it out and read it in bed at around 1.50am! (now that's keen!)

However, I remain confused in the particular case of the PHP approach. The PHP looks to see "if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml"))" and on that basis it describes the appropriate prolog, mimetype and charset. So the final three lines of the php code (where the action takes place :-) are:

   header("Content-Type: $mime;  charset=$charset");
   header("Vary: Accept");
   print $prolog_type;

One therefore assumes that the 'real http headers' ARE being used in this case. However, if I do that I can only get Chinese unless I get PHP to echo the meta tag:

<?php
if ($mime == "application/xhtml+xml")
  {
echo "<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=utf-8\" />";
  }
  else
  {
echo"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>";
  }
?> And I'm confused, because (if I've understood it properly) this should not be required?

--
Best Regards,

Bob McClelland

Cornwall (UK)
www.gwelanmor-internet.co.uk


******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to