designer wrote:
I have been using Neil Crosby's PHP approach on [1] (see signature,
below) and it works 'OK', BUT, if I omit the meta tag:
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=utf-8" />
...
Lachlan says this is simply incorrect, so I'm a bit confused by all this.
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].
For PHP, it's as simple as calling this PHP function before any of the
page content is output.
For HTML 4 and Appendix C compatible XHTML
header("Content-Type: text/html; charset=UTF-8");
Or, for real XHTML
header("Content-Type: application/xhtml+xml");
(The charset parameter is only really needed for text/* media types, for
XML served with an application/* media type, the XML declaration is
recommended for use instead which may be omitted for UTF-8 and UTF-16)
[1] http://lachy.id.au/log/2006/01/content-type
[2] http://www.w3.org/International/O-HTTP-charset
--
Lachlan Hunt
http://lachy.id.au/
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************