Created
May 11, 2016 09:16
-
-
Save solars/acc08689df33e26c2882039b33f0cc68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content = File.read("/home/solars/tmp/trivagocsvs/618_Hotel_report_20160405.csv") | |
=> "\"one\";\"two\"\ntest;bar\n" | |
CSV.parse(content, col_sep: ';', headers: true) | |
=> CSV::MalformedCSVError: Illegal quoting in line 1. | |
=> from /home/solars/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/csv.rb:1874:in `block (2 levels) in shift' | |
str = "\"one\";\"two\"\ntest;bar\n" | |
CSV.parse(str, col_sep: ';') | |
=> works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment