tilo/smarter_csv — pull request #31 by chrismhilton (2014-02-17 12:56:57+00:00)
Title: Handle csv files with data values containing carriage returns

There are 3 commits in my branch with associated tests to handle various scenarios when the data values within a file contain carriage return characters.

The first caters for the quoted data values containing the row separator carriage return character (which previously resulted in the CSV::MalformedCSVError). When reading the lines of data if the string contains an uneven number of quote characters then the content of the next line is added to the current line string.

The second commit caters for carriage return characters within the data when guessing line endings by ignoring those characters contained within quote characters. I made this change to resolve an issue whereby a file contained more quoted data carriage return characters than line ending characters.

The third commit caters for double carriage return characters when removing empty values so that such values are not deemed to be empty.