title: python3 encode replace unicode characters
body: <p>According to the documentation, the following command</p>
  
  <pre><code>'Brückenspinne'.encode("utf-8",errors='replace')
  </code></pre>
  
  <p>Should give me the byte sequence<code>b'Br??ckenspinne'</code>.  However, unicode characters are not replaced but encoded nevertheless :</p>
  
  <pre><code>b'Br\xc3\xbcckenspinne'
  </code></pre>
  
  <p>Can you tell me how I actually eliminate unicode characters ? (I use replace for testing purposes, I intend to use <code>'xmlcharrefreplace'</code> later.  To be totally honest, I want to convert the unicode characters to their xmlcharref, keeping everything as a string).</p>
  
  <p>Thank you.</p>