Coder Social home page Coder Social logo

Comments (4)

d99kris avatar d99kris commented on September 24, 2024 1

Hello,
Thanks for reporting the issue and providing the detailed analysis! It's a pretty bad bug and I'm surprised it's not been encountered (or detected) before.

I can confirm your test case reproduces the issue on MSVC for me as well. I'm preparing a fix in rapidcsv (incl. updates to documentation and test cases) and will likely get it in this weekend.

Meanwhile, if you need to work around it, I think there are two options:

  1. Open the file using rapidcsv, i.e. change ReadFile() to:
void ReadFile()
{
   rapidcsv::Document doc(filename);
   std::cout << doc.GetRowCount() << std::endl;
}
  1. Open the ifstream in binary mode, i.e. change ReadFile() to:
void ReadFile()
{
   std::ifstream file(filename, std::ios::binary);
   rapidcsv::Document doc(file);
   std::cout << doc.GetRowCount() << std::endl;
}

from rapidcsv.

ezemskov avatar ezemskov commented on September 24, 2024 1

Thanks Kris,
rapidcsv 8.61 fixes our issue.

from rapidcsv.

RedBreadcat avatar RedBreadcat commented on September 24, 2024

Great, thank you for the ergonomic suggestions to work around the issue in the meantime!

from rapidcsv.

d99kris avatar d99kris commented on September 24, 2024

Hello,
The reported issue has been addressed in above commit. Please let me know if you encounter any issues. Thanks!

from rapidcsv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.