Hi Peter:

Specifically, if you are going to use SQL Server Integration Services (SSIS) 
you can specify LF as the record delimiter.  It defaults to {CR}{LF} but you 
can change it in the FlatFile Connection Manager under the Advance tab. 



-----Original Message-----
From: Peter Waller <pe...@scraperwiki.com>
To: sqlite-users <sqlite-users@sqlite.org>
Cc: developers <develop...@scraperwiki.com>
Sent: Thu, Jul 24, 2014 2:27 am
Subject: [sqlite] Producing RFC4180-compliant CSV output


Hi All,

We're using `sqlite -csv` to generate CSV files because it is the best
performing thing available to us. It turns out however that the CSV spec
demands CRLF line endings [1].

There is software in the wild that barfs on non-CRLF-line-ending files,
such as SQL Server Integration Services [2].

Currently as best as we can tell from inspecting the source the output
depends on the platform you run on, depending on what "text mode" means
there. On Linux and on Windows using the official binaries, that means you
get the wrong line endings (just 'plain' \n).

We have made a patch which works well in our environment which just makes
CSV output \r\n instead of just \n. On Windows using the same compiler as
the official binaries are built with the behaviour should be the same, but
it may produce different output if a different compiler is used, because
the behaviour of a file opened in text mode could vary.

Would a patch be accepted to change the line endings to \r\n?

Thanks,

- Peter

[1] http://tools.ietf.org/html/rfc4180#section-2
[2] https://en.wikipedia.org/wiki/SQL_Server_Integration_Services
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to