Arne wrote:
But I have also noticed that I don't realy need the tag with
"Content-Type" and "charset" when I have the <?xml version="1.0"
encoding="utf-8"?> in top of the page to get valid pages, and it works
fine in IE 6 but I don't know about other browsers and versions?
Not if your serving the document as text/html. In such cases, the
document is parsed as HTML/tag-soup, not XML, so the <?xml?> PI is
ignored, but it also sends IE into quirks mode, which can produce
different results, depending on what your using, and the differences
between IE's quirks and more quirks (oops... I mean “standards
compliant”) modes :). Also, note that Appendix C [1] of the XHTML 1.0
spec recommends omitting the <?xml?> PI for compatibility with legacy
user agents.
Also, if you have the ability to do so, you should configure your
server to send the charset in the Content-Type HTTP header. At the
moment, it's only sending:
Content-Type: text/html
but it should be sending something like:
Content-Type: text/html; charset=utf-8
(after you correctly save your document as utf-8)
You should be able to configure that through a .htaccess file, if
your host allows. If that is done correctly, then you don't need to
declare it in the <meta/> tag, but note that if your going to send the
document as X(HT)ML, then you shouldn't include the charset in the
Content-Type header [2]. eg.
Content-Type: application/xhtml+xml
and then you should either include the <?xml?> PI to declare the
charset, or you can only use UTF-8 or UTF-16 because they are the defaults.
[1]
http://www.w3.org/TR/xhtml1/#C_1
(This is only a draft, but it's still got some good advice in it)
[2]
http://www.w3.org/TR/2004/WD-webarch...05/#no-charset
--
Lachlan Hunt
http://www.lachy.id.au/ la**********@lachy.id.au.update.virus.scanners
Remove .update.virus.scanners to email me,
NO SPAM and NO VIRUSES!!!