Open babymastodon opened 10 years ago
Hi, sorry this ticket has been up a while, but never saw this.
Even though CSVs don't have a proper standard. I decided to go by this RFC: http://tools.ietf.org/html/rfc4180
The general gist of it is, double quotes escape spaces/commas in fields, but uses two double quotes to escape a double quote in the field value. Also CRLF are not escaped in field values.
Thanks for looking into this. I guess it's reasonable to delete the existing double quotes from the message.
On Wed, Oct 7, 2015 at 11:07 AM, Shuan Wang notifications@github.com wrote:
Hi, sorry this ticket has been up a while, but never saw this.
Even though CSVs don't have a proper standard. I decided to go by this RFC: http://tools.ietf.org/html/rfc4180
The general gist of it is, double quotes escape spaces/commas in fields, but uses two double quotes to escape a double quote in the field value. Also CRLF are not escaped in field values.
— Reply to this email directly or view it on GitHub https://github.com/clutchski/coffeelint/issues/298#issuecomment-146280659 .
Note that some messages even seem contain escape characters which don't obey the --color=never
setting and mess up the CSV even further
https://github.com/coffeelint/coffeelint/pull/14 fixes double quotes, commas, and new lines in v3.0
@sils if --color=never
is still an issue please open a new issue on the new repo https://github.com/coffeelint/coffeelint
The filename and message columns are not escaped. Unescaped commas and newlines break the resulting CSV file. Here's an example output: