title: UTF-8 or ISO-8859-1 in XML
body: <p>We have an application this takes a text string entered by a user into a web form and packages it in XML. Just to confuse matters a little, the XML is send as the body of on Outlook email message.</p>
  
  <p>Because the users can paste almost anything into the web form (typically from Word), the text string can contain non-ASCII (7 bit) characters such as those used for open and close double quotes.</p>
  
  <p>The string is travelling intact via email but when we use the Microsoft XML parser, it complains (quite rightly) that the XML contains invalid characters.</p>
  
  <p>A quick fix is to put encoding="iso-8859-1" in the header. However, I wonder if it would be better to encode the XML file in true UTF-8 format at the start as I've read articles that state it would be better for a more harmonious world if every XML document was encoded in UTF-8?</p>
  
  <p>But... are we going to have trouble as the XML document is actually being transferred via the body of an email message? I understand that UTF-8 is a variable byte length encoding system I assume using 7 bit ASCII and escapte characters to indicate "there is more data".</p>
  
  <p>Another option is to set to UTF-8 but replace non-ASCII characters with the &amp;#nnn; format.</p>
  
  <p>Any advise on this rather complicated area appreciated.</p>
  
  <p>Cheers, Rob.</p>