rogersan wrote:Ok, with .xml file extension it displays:
"Warning: text/* type without a charset parameter seen. Defaulting to US-ASCII per section 3.1 of RFC 3023.
Warning: External encoding information specified a non-UTF-8/non-UTF-16 encoding (US-ASCII), but there was no matching internal encoding declaration. The well-formedness status of this document may change when decoupled from the external encoding information."
Yeah, that's an unfortunate part of text/xml... you may want to configure the server to serve .xml files as application/xml instead (or use .xht or .xhtml file extension which should result in application/xhtml+xml). If you only use us-ascii characters though it doesn't matter.
rogersan wrote:Although using this header:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="content-type" content="application/xhtml+xml; charset=UTF-8" />
What's wrong with that?
Nothing wrong per se, although the doctype doesn't do anything, name="" looks like you intended http-equiv="", and <meta> is never an encoding declaration in XML. If you want to declare the encoding in the file for XML then use the XML declaration (although XML defaults to UTF-8 anyway).