OpenRefine / OpenRefine/OpenRefine

Create Project as CSV with single quotes is detected as TSV

Open
#4,899 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CSV/TSV Priority: Low Type: Feature Request
Dominant language
Java
Stars
12k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
27

Description

Create Project as CSV with single quotes is detected as TSV

To Reproduce

Steps to reproduce the behavior:

  1. Create Project. Choose file. Use CSV data from the three samples below
  2. Click Next
Current Results
  • CSV with single quotes: detects columns separated by tabs (TSV)

  • CSV with double quotes: detects columns separated by commas (CSV)

  • CSV with no quotes: detects columns separated by commas (CSV)

Expected Behavior
  • CSV with single quotes should be detected as columns separated by commas (CSV)
  • Data with single quotes should also use single quotes instead of double quotes to enclose the cell data
Datasets

CSV with single quotes

'NDB_No', 'Shrt_Desc', 'Water', 'Energ_Kcal'
'01001', 'BUTTER,WITH SALT', '1.00', '333'
'01001', 'BUTTER,WITH SALT', '15.87', '717'
'01002', 'BUTTER,WHIPPED,WITH SALT', '15.87', '717'
'01003', 'BUTTER,CREAM', '15.87 oz', '717 oz'

image

CSV with double quotes

"NDB_No", "Shrt_Desc", "Water", "Energ_Kcal"
"01001", "BUTTER,WITH SALT", "1.00", "333"
"01001", "BUTTER,WITH SALT", "15.87", "717"
"01002", "BUTTER,WHIPPED,WITH SALT", "15.87", "717"
"01003", "BUTTER,CREAM", "15.87 oz", "717 oz"

image

CSV with no quotes

NDB_No, Shrt_Desc, Water, Energ_Kcal
01001, BUTTER,WITH SALT, 1.00, 333
01001, BUTTER,WITH SALT, 15.87, 717
01002, BUTTER,WHIPPED,WITH SALT, 15.87, 717
01003, BUTTER,CREAM, 15.87 oz, 717 oz

image

Contributor guide

Open the contributing guide

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

Start by reproducing the issue through Create Project, Choose file, and Next with the three CSV samples in the report. No source file or test is named; done means single-quoted data is detected as comma-separated CSV and retains single quotes when enclosing cell data.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.