Hello, I am using the single header v2.1.3, and when I try to read a CSV file where the rows are quoted strings, the parser says that the fields are int64.
#include <csv.hpp>
#include <string>
int main(void) {
std::string csv_string =
"Column\r\n"
"\"43334218001\"\r\n"
"\"43330147501\"\r\n";
auto rows = csv::parse(csv_string);
for (csv::CSVRow& row : rows) {
for (std::size_t i = 0, size = row.size(); i < size; ++i) {
auto field = row[i];
switch (field.type()) {
case csv::DataType::CSV_STRING: std::cout << "string" << std::endl; break;
case csv::DataType::CSV_INT64: std::cout << "int64" << std::endl; break;
}
}
}
return 0;
}
Quotes, when used to enclose fields, are used to escape syntactically significant characters and are not part of the data. This is consistent with other CSV parsers.
Hello, I am using the single header v2.1.3, and when I try to read a CSV file where the rows are quoted strings, the parser says that the fields are
int64
.The output is
int64
and I was expecting astring
.