csv
csv copied to clipboard
CSV Reading and Writing
## Problem When we have ```ruby array = [["foo", "bar"], [1, 2], [3, 4]] ``` one simple way to generate CSV String from this Array is: ```ruby header = array.shift...
There's an assumption made in the pattern matching code which will make it very hard to use, and that's the presumption of `Symbol` keys on `CSV::Row`. If you were to...
I just upgraded ruby to 2.7.5 and am getting this error in one of my tests: > unknown encoding name - UTF-16:UTF-8 (ArgumentError) The code that I am using looks...
``` opts = {row_sep: "|\n", col_sep: ","} CSV.parse(CSV.generate(opts) { |csv| csv
We should improve performance as much as HoneyFormat: https://github.com/buren/honey_format#benchmark
This may work: ```diff @@ -360,12 +320,14 @@ class CSV if @liberal_parsing @unquoted_value = Regexp.new("[^".encode(@encoding) + escaped_column_separator + - "\r\n]+".encode(@encoding)) + escaped_row_separator + + "]+".encode(@encoding)) else @unquoted_value = Regexp.new("[^".encode(@encoding) +...
If iterating thru multiple converters, if any single converter results in a symbol, subsequent converters are skipped. As seen in the `#convert_field` docs below: ``` # # Processes +fields+ with...
I found a couple of broken links in the 'https://ruby.github.io/csv/NEWS_md.html' section. There may be other broken links in other parts of the website as well. If you have no objections,...
A while back, I wrote a bunch of recipes for CSV. I don't think they're being copied downstream to ruby/ruby. I don't know how to fix that.