title: 'ascii' codec can't encode character u'\xe9'
body: <p>I already tried all previous answers and solution. </p>
  
  <p>I am trying to use this value, which gave me encoding related error.</p>
  
  <pre><code>ar = [u'http://dbpedia.org/resource/Anne_Hathaway', u'http://dbpedia.org/resource/Jodie_Bain', u'http://dbpedia.org/resource/Wendy_Divine', u'http://dbpedia.org/resource/Jos\xe9_El\xedas_Moreno', u'http://dbpedia.org/resource/Baaba_Maal']
  </code></pre>
  
  <p>So I tried, </p>
  
  <pre><code>d = [x.decode('utf-8') for x in ar]
  </code></pre>
  
  <p>which gives:</p>
  
  <pre><code>UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 31: ordinal not in range(128)
  </code></pre>
  
  <p>I tried out</p>
  
  <pre><code> d = [x.encode('utf-8') for x in ar]
  </code></pre>
  
  <p>which removes error but changes the original content</p>
  
  <p>original value was <code>u'http://dbpedia.org/resource/Jos\xe9_El\xedas_Moreno'</code> which converted to <code>'http://dbpedia.org/resource/Jos\xc3\xa9_El\xc3\xadas_Moreno'</code> while using <code>encode</code></p>
  
  <p>what is correct way to deal with this scenario?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Error comes when I feed these links in</p>
  
  <pre><code>req = urllib2.Request()
  </code></pre>