0

サンプルデータ:

"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 は、このデータを解析するときに MalformedCSVError を発生させることを主張します。具体的には、faster_csv.rb の 1616 行付近でスローされます。

raise MalformedCSVError unless in_quotes
4

2 に答える 2

0

あなたが抱えている問題は、ASCII以外の文字が原因だと思います。

それらをアクセント以外のものに置き換えてみて、それが機能するかどうかを確認してください。含まれている場合は、FasterCSVの:encodingオプションを使用して、ファイルの形式と一致させる必要があります。

于 2009-09-30T13:25:00.523 に答える
0

また、エンコーディングに関する関連記事をチェックしましたか?

FasterCSVを使用して「Ciarán」のような名前の行をインポートするにはどうすればよいですか?

于 2009-09-01T21:11:16.057 に答える