max-mapper / max-mapper/csv-spectrum

The test `location_coordinates.csv` contains invalid CSV

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
143
Forks
32
PR merge metrics
No merged PRs in 30d

Description

The test currently contains the following data (see commit https://github.com/max-mapper/csv-spectrum/commit/9ed330c6947381c2771eaadd06019768e6a9179):

Contact Phone Number,Location Coordinates,Cities,Counties
2095257564,37�36'37.8"N 121�2'17.9"W,Modesto,Stanislaus

This is invalid CSV: there are two values that contain a double quote ". According to the CSV standard, these values should be enclosed in quotes and the quote itself must be escaped:

  1. Each field may or may not be enclosed in double quotes (however
    some programs, such as Microsoft Excel, do not use double quotes
    at all). If fields are not enclosed with double quotes, then
    double quotes may not appear inside the fields. For example:

    "aaa","bbb","ccc" CRLF
    zzz,yyy,xxx

and:

  1. If double-quotes are used to enclose fields, then a double-quote
    appearing inside a field must be escaped by preceding it with
    another double quote. For example:

    "aaa","b""bb","ccc"

Can you please adjust the test?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the location_coordinates.csv fixture and inspect the row quoted in the issue, using the linked RFC 4180 guidance as the reference. Correct the embedded double quotes so the fixture is valid CSV, then run the relevant repository tests to confirm the updated test data is accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.