VB2005. So just diong some testing and ran into this oddity while parsing my CSV data with the TextFieldParser http://connect.microsoft.com/VisualStudio/feedback/details/679596/textfieldparser-does-not-respect-consecutive-line-breaks-in-the-middle-of-a-field where it doesn't recognize repeated line breaks in a field. Note that this is not the same as skipping blank fields. Anyway, I am testing an alternative way to get the data. I am trying the plain old Split function but that function cant handle embedded commas in a field like the TextFieldParser can. Are there any workarounds to this issue?
As an example the source data field reads:
"this is line 1
this is line 2
this is line 3
this is line 4
this is line 5"
And after I parse it with the TextFieldParser I get an output:
this is line 1
this is line 2
this is line 3
this is line 4
this is line 5
Seemingly any blank line gets ignored. If I had a memo with several paragraphs in the field this would jumble it all together with no spacing between. Does any else see this behavior?
Update: Used the CSV reader from Code project http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader and it works great. Doesn't trim the inner line breaks on empty lines.