title: Unable to parse CSV with escaped characters in quotes
body: <p>I have a series of CSV's that are badly formatted, and I am having some trouble parsing them using the CSV parser from Python's standard lib. Essentially, the CSV's are not escaping return characters, and I am getting some output that I don't understand.</p>
  
  <p>It seems that the parser can sometimes get the proper lines together, but is dropping, or adding irregularly. For example, in the entry with id=1, the quote in the middle of the string is removed but the one on the end is kept. A similar thing occurs in the last entry (id=3). I would expect the outer most quotes to be dropped in the entry as with the ids.</p>
  
  <p>It also is not combining the lines in a way that I can find to be predictable. The entry with id=2 is broken into two entries, and I cannot understand a pattern why the other two are kept intact but this one is split.</p>
  
  <p>Is there some ambiguity in the format of the CSV's that I am not understanding that makes them difficult to parse other than the unescaped return characters. I have tried a variety of format params to no avail. Any clarity would be much appreciated.</p>
  
  <p>To clarify, I understand that I can do string replacement before I parse the CSV's. I am asking why the output does not seem to be regular.</p>
  
  <p>Code:</p>
  
  <pre><code>import csv
  
  with open('text.csv') as csv_file:
      for line in csv.reader(csv_file):
          print(line)
  </code></pre>
  
  <p>Input:</p>
  
  <pre><code>"id","text"
  "1","This line here
  More Text "quoted"
  "2","This line here "quoted" More Text
  More Text "quoted" More Text"
  "3","This line here
  "quoted"
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>['id', 'text', 'id2']
  ['97910', 'This line here\r\nMore Text quoted"', '1']
  ['97930', 'This line here quoted" More Text']
  ['More Text "quoted" More Text"', '2']
  ['97930', 'This line here\r\nquoted"', '3']
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>['id', 'text', 'id2']
  ['97910', 'This line here\r\nMore Text "quoted', '1']
  ['97930', 'This line here "quoted" More Text\r\nMore Text "quoted" More Text', '2']
  ['97930', 'This line here\r\n"quoted', '3']
  </code></pre>