title: UnicodeEncodeError when writing to a file
body: <p>I am trying to write some strings to a file (the strings have been given to me by the HTML parser BeautifulSoup).</p>
  
  <p>I can use "print" to display them, but when I use file.write() I get the following error:</p>
  
  <pre><code>UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 6: ordinal not in range(128)
  </code></pre>
  
  <p>How can I parse this?</p>