q icon indicating copy to clipboard operation
q copied to clipboard

Output quoting doesn't work with newlines

Open maxharlow opened this issue 10 years ago • 3 comments

Example CSV:

columnOne,columnTwo,columnThree
testA,one one,aaa
testB,"two
two",bbb
testC,"three, three",ccc

Running:

$ q -HOd, "select * from test.csv"
columnOne,columnTwo,columnThree
testA,one one,aaa
testB,two
two,bbb
testC,"three, three",ccc

So testA and testC quote correctly, but testB with its newline doesn't.

maxharlow avatar Feb 17 '15 17:02 maxharlow

You're right. It seems that the default "minimal" output wrapping format does not cover newlines...

You can use "-W all" in the mean time in order to get coherent output. I'll make sure to fix this as soon as possible.

Harel

harelba avatar Feb 18 '15 16:02 harelba

@maxharlow Hi, can you please confirm that the workaround works for you? or is it?

harelba avatar Mar 09 '15 21:03 harelba

Yes that works -- thank you

maxharlow avatar Mar 11 '15 15:03 maxharlow