title: Detect record/row separator in a CSV file
body: <p>How can I programmatically detect what record/row separator is used in a CSV file. In 90% of the cases it is CR/LF pair, but sometimes it is either CR or LF.</p>
  
  <p>It should also take into account that line feeds in quoted data fields can differ from the row/record separators.</p>
  
  <p>How can I do that?</p>
  
  <p><strong>Update:</strong> I am only interested what is the row/record separator: CR/LF, CR, or LF.</p>