dbro / csvquote

Enables common unix utlities like cut, awk, wc, head to work correctly with csv data containing delimiters and newlines
MIT License
446 stars 24 forks source link

Behavior is changed? #20

Closed theoremoon closed 2 years ago

theoremoon commented 2 years ago

Hi, was it intended that the change the treating of the quoted comma?

the past behavior is

$ echo 'foo,"ba,r"' | csvquote | xxd
00000000: 666f 6f2c 2262 611f 7222 0a              foo,"ba.r".

but for now, it changed to

$ echo 'foo,"ba,r"' | csvquote | xxd
00000000: 666f 6f2c 2262 612c 7222 0a              foo,"ba,r".

Currently, the following example no longer works in specific situations because foo, "ba,r" is treated as the foo|ba|r instead of foo|bar by cut

https://github.com/dbro/csvquote/blob/a861cddbed634fbe4f38f1acfeffe242c854a971/README.md#L55

I'm just wondering if it is good. I don't have any suggestions/opinions about this change

dbro commented 2 years ago

Yikes, thanks for catching this bug so quickly. It should be fixed with the latest commit - please check and re-open if necessary.