title: cross-encoding XSL transformations
body: <p>I have some operations to do on an XML files (nothing important) and XSL applies very well in this case.
  However, my input file is encoded in UTF-8 and the file after the transformation MUST be encoded in iso-8859-1. (I do not control the encoding of the input file either)</p>
  
  <p>Everything goes well except that some special characters present in utf-8 and not in iso-8859 are escaped in the output file.</p>
  
  <p>For instance I have
  <code>&lt;text&gt;some text with a € character&lt;/text&gt;</code>
  transformed in 
  <code>&lt;text&gt;some text with a &amp;#8364; character&lt;/text&gt;</code></p>
  
  <p>The "&#8364;" is in the output file is an issue for me.</p>
  
  <p>As we have to do something with those special characters which are not in ISO, I first thought of transforming them manually with the replace function: replace(., '€', 'euros')
  But there are just so many characters in utf-8 which are not in iso that it's quickly boring... and slow!</p>
  
  <p>Do you have a better solution ? (assuming we could just remove those characters or transforming them to any viable iso character)</p>
  
  <p>Thanks in advance</p>