diff --git a/src/ObjCommon/Csv/CsvStream.cpp b/src/ObjCommon/Csv/CsvStream.cpp index 1f0ce46b..bf3747b0 100644 --- a/src/ObjCommon/Csv/CsvStream.cpp +++ b/src/ObjCommon/Csv/CsvStream.cpp @@ -25,9 +25,20 @@ bool CsvInputStream::NextRow(std::vector& out) const col.clear(); col.str(std::string()); } + else if(c == '\r') + { + c = m_stream.get(); + if (c == '\n') + break; + col << '\r'; + } + else if(c == '\n') + { + break; + } else { - col << c; + col << static_cast(c); } c = m_stream.get(); @@ -35,10 +46,7 @@ bool CsvInputStream::NextRow(std::vector& out) const if(!isEof) { - const auto lastEntry = col.str(); - - if(!lastEntry.empty()) - out.emplace_back(col.str()); + out.emplace_back(col.str()); } return !isEof;