Project

General

Profile

This project is closed and read-only.

Actions

Bug #2966

closed

CSV reports illegal quoting on line ...

Bug #2966: CSV reports illegal quoting on line ...

Added by sgoings (Seth Goings) over 16 years ago. Updated over 15 years ago.

Status:
Rejected
ruby -v:
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]
[ruby-core:28668]

Description

=begin
I have a line of code:
@array = CSV.read("#{@dir}/#{@file}")

Which eventually reads line 24 (below) in file attached to this bug:
BBBP,004,/etc/release,"LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64""

This raises a MalformedCSVError, "Illegal quoting on line #{lineno + 1}."

I understand the issue of the nested quotes and how the line is being parsed, but I don't see an issue with how this CSV line is written. Should this sort of line be parse-able with a csv library? If not, can/should the library fail nicely, instead of ruining the whole "read" call?
=end


Files

performance_log.csv (261 KB) performance_log.csv CSV file that fails parsing sgoings (Seth Goings), 03/16/2010 01:22 AM
Actions

Also available in: PDF Atom