我发现一个CSV解析问题与FasterCSV(1.5.0),这似乎是一个真正的错误,但我希望有一个解决方法.
基本上,当字段用引号括起来后,在分隔符之后添加一个空格(在我的例子中为逗号)会生成一个MalformedCSVError.
这是一个简单的例子:
# No quotes on fields -- works fine FasterCSV.parse_line("one,two,three") => ["one","two","three"] # Quotes around fields with no spaces after separators -- works fine FasterCSV.parse_line("\"one\",\"two\",\"three\"") => ["one","three"] # Quotes around fields but with a space after the first separator -- fails! FasterCSV.parse_line("\"one\",\"three\"") => FasterCSV::MalformedCSVError: Illegal quoting on line 1.
我生气了吗,还是FasterCSV的bug?