Hi,

well we could discuss endlessly, what well formed CSV files are. Given that we 
cannot fix the generation of the CSV file, why not making the importer a little 
bit smarter?

The .import command already treats " as literal data, when it doesn't appear at 
the beginning of the cell, but it requires an even number of " in the same cell 
to don't get confused in breaking up the row into cells.

All I ask for is to treat an odd number of " in a cell as literal data except 
when the rule for dequoting applies, i. e. when the cell starts with a ".

Bye.

-----Ursprüngliche Nachricht-----
Von: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
Im Auftrag von Petite Abeille
Gesendet: Dienstag, 25. Juni 2013 19:27
An: General Discussion of SQLite Database
Betreff: Re: [sqlite] sqlite3: .import command handles quotation incorrectly


On Jun 25, 2013, at 11:19 AM, Nißl Reinhard <reinhard.ni...@fee.de> wrote:

> because it stays in quotation mode until it finds a further ", which is 
> incorrect. Quotation mode may only get activated when " appears at the 
> beginning of a column value.

Meh. check the recent "escape quote for csv import" thread.

As mentioned multiple time, by multiple people, on multiple occasions.


  7.  If double-quotes are used to enclose fields, then a double-quote
      appearing inside a field must be escaped by preceding it with
      another double quote.  For example:

      "aaa","b""bb","ccc"


http://tools.ietf.org/html/rfc4180
_______________________________________________
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