title: Remove 'b' flag in CSV output
body: <p>I am trying to write the outputs to a CSV file in Python 3.4 but the CSV file always contains 'b' flags.  For example, b'The text output1', b'The text output2',...  I am wondering if there is a way to get rid of the 'b' flags.  I understand that this is not an issue in Python 2.X.</p>
  
  <p>Here are the codes that I used</p>
  
  <pre><code>with open('test.csv', 'w') as f:
      writer = csv.DictWriter(f, ['field'], extrasaction='ignore')
      writer.writeheader()
      test_text = mongo.test.find({'text': text})
      for t in test_text
          writer.writerow({i:v.encode('utf') for i,v in t.items()})
  </code></pre>
  
  <p>Thanks very much</p>
  
  <p>------Updates-----------</p>
  
  <p>Thanks very much for Tim Pietzcker, John Zwinck, and Warren Weckesser providing helpful comments and answers.  Per Warren's suggestions, if I change my codes to</p>
  
  <pre><code>import csv
  
  data = [chr(0x03d5) + 'oo', 'b' + chr(0x0101) + 'r']
  
  with open('test.csv', 'w') as f:
      writer = csv.writer(f)
      for item in data:
          writer.writerow([item])
  </code></pre>
  
  <p>I will get error message</p>
  
  <pre><code>UnicodeEncodeError: 'charmap' codec can't encode character '\u03d5' in position 0: character maps to &lt;undefined&gt;
  </code></pre>
  
  <p>if I change my codes to</p>
  
  <pre><code>import csv
  
  data = [chr(0x03d5) + 'oo', 'b' + chr(0x0101) + 'r']
  
  with open('test.csv', 'w') as f:
      writer = csv.writer(f)
      for item in data:
          writer.writerow([item.encode('utf')])
  </code></pre>
  
  <p>I will get outputs with 'b' flags</p>
  
  <pre><code>b'\xcf\x95oo'
  b'b\xc4\x81r'
  </code></pre>
  
  <p>Any thoughts on how this is happening and how I might be able to fix it?  Thanks again.</p>
  
  <p>------Updates 2-----------</p>
  
  <p>Thanks very much for Warren's solution.  The following codes worked!</p>
  
  <pre><code>import csv
  
  data = [chr(0x03d5) + 'oo', 'b' + chr(0x0101) + 'r']
  
  with open('test.csv', 'w', encoding='utf8') as f:
      writer = csv.writer(f)
      for item in data:
          writer.writerow([item])
  </code></pre>