title: Python write to file utf-8
body: <p>I am writing a tweepy based bot. I have the desired information being pulled and am trying to write that information to a text file for further parsing. However I am having a problem with f.write and am unsure how to approach the issue. Forgive me if this is covered elsewhere, while I searched I'm still pretty new to programming. </p>
  
  <p>I left out authentication.</p>
  
  <pre><code>#!/usr/bin/python
  
  searchQuery = 'foo'
  fName = 'log.txt'
  tweets = api.search(q=searchQuery,count=3,result_type="recent")
  with open(fName, 'w') as f:
      for tweet in tweets:
          tweetText = tweet.text
          f.write(tweetText)
          print [tweetText]
  </code></pre>
  
  <p>error: UnicodeEncodeError: 'ascii' codec can't encode character u'\u2026' in position 139: ordinal not in range(128)</p>