title: Troubles in printing unicode string that I have in byte format
body: <p>Reading from a database I get the following value</p>
  
  <p><code>b'd\xe2\x80\x99int'</code></p>
  
  <p>How can I print it to get the string <code>d’int</code> (note that this is different from <code>d'int</code>)?</p>
  
  <p>I tried with <code>print(b'd\xe2\x80\x99int'.decode('utf-8'))</code> but I get the error:</p>
  
  <pre><code>UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 1: ordinal not in range(128)
  </code></pre>
  
  <p>EDIT: thanks to the comment I understood that the problem is not in my Python code but in emacs, I am having exactly the same problem as described here <a href="https://stackoverflow.com/questions/11924515/unicode-conversion-issue-using-python-in-emacs">Unicode conversion issue using Python in Emacs</a></p>
  
  <p>I will close the question</p>