Plain Text
Joel Spolsky: It would be convenient if you could put the Content-Type of the HTML file right in the HTML file itself, using some kind of special tag. Of course this drove purists crazy... how can you read the HTML file until you know what encoding it's in?!
The same thing is true of XML. It is easy to eliminate what remains the single largest source of invalid feeds. Take a moment and ensure that the first line of your feeds look like the following:
<?xml version="1.0" encoding="iso-8859-1"?>
Or, if you happen to be on a Windows platform and have a tendency to cut and paste content that may have so-called smart quotes in it, use the following:
<?xml version="1.0" encoding="windows-1252"?>
Finally, while I don't know of a single feed parser that cares about the charset specified on the Content-Type header, it doesn't hurt to make it match. Technically, if you use text/xml, the default is supposed to override what is specified in the document itself. You can avoid this by simply using application/xml instead.