title: Python csv new line character in field
body: <p>I am having an issue reading a thorn-delimited csv file that I think has a new line character in one of the fields. It is forcing the row over two lines so I cannot read the values in the last fields of the row. I have tried opening in <code>new line mode</code> but not sure what the best way of going about this is.</p>
  
  <p>This is how I am trying to read the file in <code>python</code>:</p>
  
  <pre><code>csv.register_dialect('BB', delimiter='\xfe')
  with open(file, 'rU') as file_in: 
      log=csv.reader(file_in, dialect='BB')
      for row in log:
          print row
  </code></pre>
  
  <p>This works fine for most of the file but there is a row that I assume has a new line character in one of the fields - i'm not sure best how to diagnose it. This is a screenshot of how the row looks in notepad, as you can see it forces the row on two lines when it should look like the two rows below.
  <a href="https://i.stack.imgur.com/rMJxc.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/rMJxc.jpg" alt="enter image description here"></a></p>
  
  <p>Reading this with <code>csv.reader</code> the row looks like this:</p>
  
  <p>['06-13-2015-10:13:41', '0', '', '', '', '', '', '', '', '', '', '', '142', '', '5', '7.0', '2', '', 'cmhkl966', 'amex_674', '1', '0.00', '', '', "' "]</p>
  
  <p>i.e. truncated at that first apostrophe.</p>