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

Add fallback to "simple" dialect for comma and semicolon -separated content autodetection #201

Open
rufik opened this issue Jan 29, 2025 · 2 comments

Comments

@rufik
Copy link

rufik commented Jan 29, 2025

I'm hitting an error Unable to align: Inconsistent double quotes at line 3 when double quotes are used inside field value, like that example:

ID;name;comment
12;first one;here goes the comment
13;lorem delenit;Lorem "ipsum dolor" sit amet
15;last one;In dolore nibh takimata sanctus amet

As you can see fields are not quoted. Quotes are used only inside the field string. And extension does report it as an error and refuses to align data :(

@flaviotordini
Copy link

I'm hitting this too. Any double quote will disable line alignment.

@mechatroner
Copy link
Owner

Thank you for reporting this. It looks like the root cause is that Rainbow CSV is currently too prescriptive when it comes to comma and semicolon-separated files and doesn't try to autodetect non-standard dialects. If you just have one or two files like this you can "fix" it by manually switching the dialect to "simple" : select any semicolon character with cursor -> Right Click -> Set Rainbow Separator and then choose the "Literal" policy. I will try to figure out how to adjust the autodetection to handle such files automatically as I understand not every use case requires compliance with RFC 4180

@mechatroner mechatroner changed the title Unable to align: Inconsistent double quotes Add fallback to "simple" dialect for comma and semicolon -separated content autodetection Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants