title: "for line in..." results in UnicodeDecodeError: 'utf-8' codec can't decode byte
body: <p>Here is my code,</p>
  <pre><code>for line in open('u.item'):
  # Read each line
  </code></pre>
  <p>Whenever I run this code it gives the following error:</p>
  <blockquote>
  <p>UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 2892: invalid continuation byte</p>
  </blockquote>
  <p>I tried to solve this and add an extra parameter in open(). The code looks like:</p>
  <pre><code>for line in open('u.item', encoding='utf-8'):
  # Read each line
  </code></pre>
  <p>But again it gives the same error. What should I do then?</p>