title: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 0: ordinal not in range(128)
body: <p>I'm new to Python and have to build an application to get historical data from Twitter. I can see the tweets in my console and all the information I need! 
  But the problem I have now is that I need to write this information to a .csv file but I encounter the following error while running the code:
  <code>"UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 0: ordinal not in range(128)"</code>. I know that the problem is that the Tweets I'm collecting are written in Swedish so its a frequent use of the letter <code>"ÅÄÖ"</code>. 
  Can anyone please help me with this or have any pointers as to where i should start looking for a solution? </p>
  
  <pre><code>#!/usr/bin/python
  # -*- coding: utf-8 -*-
  
  
  from TwitterSearch import *
  import csv
  
  import codecs
  
  
  
  
  
  try:
      tuo = TwitterUserOrder('Vismaspcs') # create a TwitterUserOrder
  
  
      ts = TwitterSearch(
          consumer_key = '',
          consumer_secret = '',
          access_token = '',
          access_token_secret = ''
      )
  
      # start asking Twitter about the timeline
      for tweet in ts.search_tweets_iterable(tuo):
          print( '@%s tweeted: %s' % ( tweet['user']['screen_name'], tweet['text']) )
          print (tweet['created_at'],tweet['favorite_count'],tweet ['retweet_count'])
  
  
  
  
      with open('visma.csv','w') as fout:
          writer=csv.writer(fout)    
          writer.writerows([tweet['user']['screen_name'],tweet['text'],tweet['created_at'],tweet['favorite_count'],tweet['retweet_count']])
  
  
  
  except TwitterSearchException as e: # catch all those ugly errors
      print(e)
  </code></pre>