Code Monkey home page Code Monkey logo

Comments (5)

ryu1kn avatar ryu1kn commented on September 27, 2024

Hello @slpixe , thanks for the suggestion.

So, you want an option to always double quote all field values. Do you mind sharing why you want that option?

from csv-writer.

vergissberlin avatar vergissberlin commented on September 27, 2024

In my case, I want to create test data that is very close to the original one.
The original uses quotes for every field.

André

from csv-writer.

phillipplum avatar phillipplum commented on September 27, 2024

Hey @ryu1kn, thanks for the nice library.
I also need this option. The external software for which we write the CSV does not read the CSV correctly without quotation marks.

from csv-writer.

ryu1kn avatar ryu1kn commented on September 27, 2024

Already 3 people raising this. (Sorry I somehow missed your comment, @vergissberlin ...) Seems like some programmes are picky on this...

And as @slpixe pointed, from RFC 4180 perspective, quoting all fields is possible too.

Each field may or may not be enclosed in double quotes

I was kind of reluctant to introduce this as I think it's parser's responsibility to deal with all valid CSVs (plus I didn't want to complicate csv-writer even it would be minor). But given the reality, I think it's reasonable to allow csv-writer to produce fields always with quotes.

from csv-writer.

ryu1kn avatar ryu1kn commented on September 27, 2024

Introduced alwaysQuote flag. Released as v1.5.0.

from csv-writer.

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.