0

Sample data:

"iWine","Barcode","Location","Bin","Size","Valuation","Price","StoreName",\ "PurchaseDate","Note","Vintage","Wine","Locale","Country","Region","SubRegion",\ "Appellation","Producer","SortProducer","Type","Color","Category","Varietal",\ "MasterVarietal","Designation","Vineyard","WA","WS","IWC","BG","WE","JR",\ "RH","JG","GV","JK","LD","CW","CT","MY","BeginConsume","EndConsume"

"334142","15240542","Cellar","","750ml","","0","","","","2003",\
"Bodegas y Viñedos Alión Ribera del Duero","Spain, Castilla y León, Ribera del Duero","Spain",\
"Castilla y León","Unknown","Ribera del Duero","Bodegas y Viñedos Alión",\
"Alión, Bodegas y Viñedos","Red","Red","Dry","Tempranillo","Tempranillo","Unknown","Unknown",\
"","","","","","","","","","","","","91.3333333333333","","2011","2021"

FasterCSV insists on raising MalformedCSVError when parsing this data, specifically thrown around line 1616 in faster_csv.rb

raise MalformedCSVError unless in_quotes
4

2 回答 2

0

另外-您是否查看过有关编码的相关帖子?

如何使用 FasterCSV 导入名称为“Ciarán”的行?

于 2009-09-01T21:11:16.057 回答
0

我猜你遇到的问题是由于非ASCII字符。

尝试用非口音替换它们,看看它是否有效。如果是这样,您必须使用 FasterCSV 上的 :encoding 选项来匹配您的文件格式。

于 2009-09-30T13:25:00.523 回答