title: Python unicode accent a (à) hex
body: <p>I have a string from bs4 that is</p>
  
  <pre><code>s = "vinili-disponibili/311-canzoniere-del-lazio-lassa-st\u00c3\u00a0-la-me-creatura.html"
  </code></pre>
  
  <p><code>\u00c3\u00a0</code>should be accent a (à) I have gotten it to show up in the console partly correct as</p>
  
  <pre><code>vinili-disponibili/311-canzoniere-del-lazio-lassa-stÃ -la-me-creatura.html
  </code></pre>
  
  <p>with</p>
  
  <pre><code>str2 = u'%s' % s
  print(str2.encode('utf-8').decode('unicode-escape'))
  </code></pre>
  
  <p>but it's decoding c3 and a0 separately, so I get a tilde A instead of an accent a. I know that c3 a0 is the hex utf-8 for accent a. I have no idea what's going on and I got to here using Google and the combinatory approach to the answers I got. This entire character encoding thing seems like a big mess to me.</p>
  
  <p>The way it is supposed to be is</p>
  
  <pre><code>311-canzoniere-del-lazio-lassa-stà-la-me-creatura.html
  </code></pre>
  
  <p>EDIT:
  Andrey's method worked when printing it out, but trying to use urlopen with the string I get <code>UnicodeEncodeError: 'ascii' codec can't encode character '\xe0' in position 60: ordinal not in range(128)</code></p>
  
  <p>After using <code>unquote(str,":/")</code> it gives <code>UnicodeEncodeError: 'ascii' codec can't encode characters in position 56-57: ordinal not in range(128)</code>.</p>