Skip to content

Instantly share code, notes, and snippets.

@Lytol Lytol/parse
Created Mar 25, 2014

Embed
What would you like to do?
#!/usr/bin/env ruby
require 'csv'
abort("You must specify a CSV file") unless ARGV.length == 1
CSV do |out|
CSV.foreach(ARGV[0], encoding: 'ISO-8859-1') do |row|
out << row.map { |c| c.nil? ? nil : c.encode('UTF-8') }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.