TIP:
Since ASCII is almost never an appropriate character set for an XML
document, application/xml is much preferred over
text/xml. Unfortunately, most web servers including Apache 2.0.36 and
earlier are configured to use text/xml by default.
It's worth editing your
mime.types file to fix this. Alternately, at
least with Apache, if you don't have root access to
your web server, you can use the AddType and AddCharset directives in
your .htaccess files to override the server-wide
defaults.
We've focused on MIME types in HTTP
headers because that's the most common place where
character-set metadata is applied to XML documents. However, MIME
types are also used in some filesystems (e.g., the BeOS), in email,
and in other environments. Other systems may provide other forms of
character-set metadata. If such metadata is available for a document,
whatever form it takes, the parser should use it, though in practice
this is an area where not all parsers and programs are as conformant
as they should be.