csv-parser icon indicating copy to clipboard operation
csv-parser copied to clipboard

CSVReader fails with files bigger than 10 MB when constructed with std::ifstream

Open lamorlette-cintoo opened this issue 3 years ago • 1 comments

I used to construct CVSReader with a std::ifstream as follows:

const std::filesystem::path file_path {"foo"};
std::ifstream input(file_path , std::ios::binary | std::ios::in);
csv::CSVReader path_reader {input};

It is working perfectly fine with relatively small files, but it throws an exception with files bigger than 10 MB.

I found out that the same files work perfectly fine when using the other CVSReader constructor, taking the filename as parameter:

const std::filesystem::path file_path {"foo"};
csv::CSVReader path_reader {file_path.string()};

(Unfortunately I can't share with you an example because I don't own them.)

lamorlette-cintoo avatar Jun 13 '22 10:06 lamorlette-cintoo

Duplicate of #180

sjoubert avatar Sep 13 '22 14:09 sjoubert