title: Python utf-8 accents problem
body: <p>I am having some problems with accents.</p>
  
  <p>I did a python script that are getting the word "<strong>refeiÃ§Ã£o</strong>" from some input (IMAP fetch), this word is in Portuguese and I need convert it to be human readable. After decode, it should appear like "<strong>refeição</strong>" but I am not getting this result... </p>
  
  <pre><code>&gt;&gt;&gt; print a 
  refeiÃ§Ã£o
  &gt;&gt;&gt; ENCODING = locale.getpreferredencoding()
  &gt;&gt;&gt; print ENCODING
  UTF-8
  &gt;&gt;&gt; print a.encode(ENCODING)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128)
  &gt;&gt;&gt; a.decode('utf-8')
  u'refei\xe7\xe3o'
  &gt;&gt;&gt; print a.decode('utf-8')
  refeiÃ§Ã£o
  </code></pre>
  
  <p>Updated:</p>
  
  <pre><code>root@ticuna:/etc/scripts# locale
  LANG=en_US.UTF-8
  LC_CTYPE="en_US.UTF-8"
  LC_NUMERIC="en_US.UTF-8"
  LC_TIME="en_US.UTF-8"
  LC_COLLATE="en_US.UTF-8"
  LC_MONETARY="en_US.UTF-8"
  LC_MESSAGES="en_US.UTF-8"
  LC_PAPER="en_US.UTF-8"
  LC_NAME="en_US.UTF-8"
  LC_ADDRESS="en_US.UTF-8"
  LC_TELEPHONE="en_US.UTF-8"
  LC_MEASUREMENT="en_US.UTF-8"
  LC_IDENTIFICATION="en_US.UTF-8"
  LC_ALL=
  </code></pre>
  
  <p>Also, theses words are inserted in a mysql database and the "unreadable" characters are showing in the same way that is in terminal. 
  The table collation is utf8_general_ci</p>