title: XML declaration encoding
body: <p>What does it actually do? On my very basic level of understanding XML is just a formatted text. So there is no binary&lt;->text transformation involved.  </p>
  
  <p>I highly suspect that the only difference between UTF-8 and ASCII encoding is that ASCII encoding will make XML writer work harder by converting all the non-ASCII characters into XML entities as opposed to just reserved XML characters. So ASCII encoded XML can still contain UTF-8 characters, except it is going to be slightly longer and uglier.</p>
  
  <p>Or is there some other function to it?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I perfectly understand how individual characters are converted into byte(s) by means of encoding. However XML is just text markup and at no point does that.</p>
  
  <p>The question really is why XML encoding value is stored in the XML? Or what is the case where XML reader would need to know which encoding was used for any particular XML document?</p>