If the charset parameter is not specified, the encoding for text / plain is us-ascii. The encoding defined in the mime type takes precedence over the encoding defined in the XML document, so if the XML document is not us-ascii, the correct client will not correctly parse the xml.
4.1.2 RFC 2046 states that for text / plain,
The default character set that should be accepted in the absence of the charset parameter is US-ASCII.
Even using text / xml, the default encoding is us-ascii, from section 3.1 of RFC 3023 ,
Complies with [RFC2046], if the text / xml object is obtained using the charset parameter is omitted, MIME processors and XML processors MUST use the default charset value for "us-ascii"
If you use text / plain with the specified correct character set, charset is now specified twice, so it is better to use the / xml application, which does not have a default character set associated with it, and let the encoding be declared as an XML document.
There is an interesting post here.
source share