If a file uses '\r' line feeds and the last character is a linefeed
(empty line after the data)
Csv Reader will throw a exception at the end of the file.
In case of '\n' or "\r\n" as line-feed this is not the case.
// Will fail
enum failData =
"name, surname, age
Joe, Joker, 99\r";
enum nonFailData =
"name, surname, age
Joe, Joker, 99\r\n";
import std.csv, std.stdio;
void main(string[] args)
{
auto reader = csvReader(failData);
foreach(entry; reader)
{
writeln(entry);
}
}
togrue
Comment #1 by github-bugzilla — 2016-01-10T23:14:39Z