handle trailing space in whitespace separated data
fixes #5602
Merge pull request #5604 from tanmaykm/readcsv

handle trailing whitespace in whitespace separated data