Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Shawn Wagner
Still applies; just badly worded. On Tue, May 21, 2019 at 8:47 AM Dominique Devienne wrote: > On Tue, May 21, 2019 at 5:36 PM Shawn Wagner > wrote: > > > I have a handy script that can handle that sort of input with extra > spaces > > (With the --strip option), and other stuff that csv .import

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Keith Medcalf
On Tuesday, 21 May, 2019 07:55, Richard Hipp wrote: >On 5/21/19, Patrick Sherrill wrote: >> I don’t know about ‘valid’ csv, it has been a moving target for >>decades. >> White space as far as my recollection should not be considered in >>parsing a csv. >I'm going by RFC 4180.

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Dominique Devienne
On Tue, May 21, 2019 at 5:36 PM Shawn Wagner wrote: > I have a handy script that can handle that sort of input with extra spaces > (With the --strip option), and other stuff that csv .import doesn't always > deal well with: > > https://github.com/shawnw/useful_sqlite_extensions/tree/master/tools

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Shawn Wagner
I have a handy script that can handle that sort of input with extra spaces (With the --strip option), and other stuff that csv .import doesn't always deal well with: https://github.com/shawnw/useful_sqlite_extensions/tree/master/tools On Tue, May 21, 2019 at 6:14 AM Faheem Mitha wrote: > > Hi,

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Richard Hipp
On 5/21/19, Patrick Sherrill wrote: > I don’t know about ‘valid’ csv, it has been a moving target for decades. > White space as far as my recollection should not be considered in parsing a > csv. I'm going by RFC 4180. https://tools.ietf.org/html/rfc4180. On page 2 it says: "Spaces are

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Jose Isaias Cabrera
Patrick Sherrill, on Tuesday, May 21, 2019 09:38 AM, wrote... >I don’t know about ‘valid’ csv, it has been a moving target for decades. White >space as far as my recollection should not be considered in parsing a csv. In wikipedia [1], under Specification, #3, it states, "with the records

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Simon Slavin
On 21 May 2019, at 2:38pm, Patrick Sherrill wrote: > I don’t know about ‘valid’ csv, it has been a moving target for decades. > White space as far as my recollection should not be considered in parsing a > csv. You can do it, but you have to be consistent. There is a problem with this

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Patrick Sherrill
I don’t know about ‘valid’ csv, it has been a moving target for decades. White space as far as my recollection should not be considered in parsing a csv. My 2 cents. Pat... Sent from my iPhone > On May 21, 2019, at 9:28 AM, Richard Hipp wrote: > >> On 5/21/19, Faheem Mitha wrote: >> The

Re: [sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Richard Hipp
On 5/21/19, Faheem Mitha wrote: > The ".import" command does not parse CSV correctly. > somestuff, "some,stuff" This is not valid CSV. There is an extra space character after the comma and before the double-quote. -- D. Richard Hipp d...@sqlite.org

[sqlite] CSV import does not handle fields with a comma surrounded by double

2019-05-21 Thread Faheem Mitha
Hi, I'm seeing the same bug reported here, in an issue from 2009, supposedly fixed in 2014. https://www.sqlite.org/src/tktview?name=c25aab7e7e with the title: The ".import" command does not parse CSV correctly. I'm using Debian buster, with SQLite version 3.27.2-2. Here is a simple