Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing two-column csv with semi-column separator is not detected #1042

Closed
FranciscoGileno opened this issue Feb 23, 2024 · 2 comments
Closed

Comments

@FranciscoGileno
Copy link

Steps to reproduce:
Go to: https://www.papaparse.com/demo
Try to parse this string:

feedback_event;feedback_time
verified;1708657810

OBS: The third line is empty (If we remove the third-line, it works)
This is the same as:

feedback_event;feedback_time\nverified;170865781023\n

OBS: Usually the editors add this \n in the end of the last line.

Parameters:

Delimiters: 'auto',
Preview: 1

Results:

{
    "data": [
        {
            "feedback_event;feedback_time": "verified;1708657810"
        }
    ],
    "errors": [
        {
            "type": "Delimiter",
            "code": "UndetectableDelimiter",
            "message": "Unable to auto-detect delimiting character; defaulted to ','"
        }
    ],
    "meta": {
        "delimiter": ",",
        "linebreak": "\n",
        "aborted": false,
        "truncated": true,
        "cursor": 49,
        "fields": [
            "feedback_event;feedback_time"
        ]
    }
}

Expected results:
Should parse the string and detect the ; as delimiter

OBS:

  1. If the CSV has three or more columns, it works
  2. If the two-column CSV has , as delimiter, it works.
@marcel-happyfloat
Copy link

Run into the same issue today. Thanks for reporting it!

@Leka74
Copy link

Leka74 commented Oct 14, 2024

Had this issue as well. If you set the skipEmptyLines to true, it parses it correctly.

@pokoli pokoli closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants