• kryptonianCodeMonkey@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    11 hours ago

    Correct me if I’m wrong, but doesn’t text with commas in it get put in double quotes in acsv file to avoid this exact thing?

    Like if I had cells (1A: this contains no comma), (2B: this, contains a comma), and (3C: end of line), the csv file would store (this contains no comma,“this, contains a comma”,end of line)

    • Wolf314159@startrek.website
      link
      fedilink
      arrow-up
      3
      ·
      10 hours ago

      A CSV is just a long string of text with a few control characters tossed in for end lines. There are practically no rules enforced by the file type itself. You can dump that unsanitized and poorly awk’d data into whatever awful mess you want. Nobody’s stopping you. Sure, excel will force it’s CSV formatting rules on you when you export like a child’s training wheels. But that’s not relevant here.

    • patrick@lemmy.bestiver.se
      link
      fedilink
      English
      arrow-up
      14
      ·
      16 hours ago

      Yes and no. Like yes, that can be true. But a lot of tools don’t handle commas correctly no matter how you escape them.