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

Determine CSV delimiter based on header #3127

Open
Tinggaard opened this issue Nov 19, 2024 · 2 comments
Open

Determine CSV delimiter based on header #3127

Tinggaard opened this issue Nov 19, 2024 · 2 comments
Labels
feature-request New feature or request

Comments

@Tinggaard
Copy link

Would it be possible to determine the CSV delimiter based on the first line of the file?

I have a usecase where I store floats using a comma , as a decimal separator, which conflicts with the syntax highlighter.

Eg. the file

foo;bar;baz
1,2;1,7;2,7
1,5;8,5;-5,5

Renders as follows
image

As the header only contains one of the four accepted delimiters ;, would it not be safe to assume that any other character is not the delimiter?

@Tinggaard Tinggaard added the feature-request New feature or request label Nov 19, 2024
@keith-hall
Copy link
Collaborator

Thanks for reporting. We had a look at ways to fix this previously, but never got round to finalizing it. #2078 (comment)
If you're up to creating a PR, it would be well received :)

@Tinggaard
Copy link
Author

Maybe I will look into it, although I don't currently have a great idea on how to achieve the desired result...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants