title: how to change SQL xml encoding in stored procedure
body: <p><code>sp_xml_preparedocument</code> accepts an local variable declared as <code>varchar(max)</code> and set to xml received without xml declaration.</p>
  
  <p>Default encoding is then set to UTF-8 I suppose.</p>
  
  <p>When I try to change it to something like UTF-16 message </p>
  
  <blockquote>
    <p>Switch from current encoding to
    specified encoding not supported.</p>
  </blockquote>
  
  <p>If I leave it on default message </p>
  
  <blockquote>
    <p>An invalid character was found in
    text content.</p>
  </blockquote>
  
  <p>is shown.</p>
  
  <p>Any suggestion?</p>
  
  <p>Thx</p>